File size: 1,069 Bytes
2b7bf83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# cuda related
export CUDA_HOME=/usr/local/cuda-10.0
export LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"

# path related
export PRJ_ROOT="${PWD}/../../.."
if [ -e "${PRJ_ROOT}/tools/venv/bin/activate" ]; then
    # shellcheck disable=SC1090
    . "${PRJ_ROOT}/tools/venv/bin/activate"
fi

# python related
export OMP_NUM_THREADS=1
export PYTHONIOENCODING=UTF-8
export MPL_BACKEND=Agg

# check installation
if ! command -v parallel-wavegan-train > /dev/null; then
    echo "Error: It seems setup is not finished." >&2
    echo "Error: Please setup your environment by following README.md" >&2
    return 1
fi
if ! command -v jq > /dev/null; then
    echo "Error: It seems jq is not installed." >&2
    echo "Error: Please install via \`sudo apt-get install jq\`." >&2
    echo "Error: If you do not have sudo, please download from https://stedolan.github.io/jq/download/." >&2
    return 1
fi
if ! command -v yq > /dev/null; then
    echo "Error: It seems yq is not installed." >&2
    echo "Error: Please install via \`pip install yq\`." >&2
    return 1
fi