"megatron/core/pipeline_parallel/schedules.py" did not exist on "bea16fa3319abf7901d6b434ec4becdac5a684f6"
install.sh 1.06 KB
Newer Older
1
2
3
4
5
6
7
8
9
#!/usr/bin/env bash

unset PYTORCH_VERSION
# For unittest, nightly PyTorch is used as the following section,
# so no need to set PYTORCH_VERSION.
# In fact, keeping PYTORCH_VERSION forces us to hardcode PyTorch version in config.

set -e

moto's avatar
moto committed
10
11
12
root_dir="$(git rev-parse --show-toplevel)"
conda_dir="${root_dir}/conda"
env_dir="${root_dir}/env"
13

moto's avatar
moto committed
14
15
16
17
18
19
20
cd "${root_dir}"

# 0. Activate conda env
eval "$("${conda_dir}/Scripts/conda.exe" 'shell.bash' 'hook')"
conda activate "${env_dir}"

# 1. Install PyTorch
21
22
23
24
25
26
27
if [ -z "${CUDA_VERSION:-}" ] ; then
    cudatoolkit="cpuonly"
else
    version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
    cudatoolkit="cudatoolkit=${version}"
fi
printf "Installing PyTorch with %s\n" "${cudatoolkit}"
28
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch "${cudatoolkit}"
29

moto's avatar
moto committed
30
# 2. Install torchaudio
31
printf "* Installing torchaudio\n"
32
python setup.py install
moto's avatar
moto committed
33
34
35
36
37

# 3. Install Test tools
printf "* Installing test tools\n"
conda install -y -c conda-forge codecov pytest pytest-cov
pip install kaldi-io 'librosa>=0.8.0' parameterized PySoundFile scipy