forked from biomed-AI/MolRep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·30 lines (25 loc) · 1.33 KB
/
install.sh
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
# default pytorch version is 1.5.0
PYTORCH_VERSION=1.5.0
# set CUDA variable (defaults to cpu if no argument is provided to the script)
# available options for for pytorch 1.4.0 are cpu, cu92, cu100, cu101
CUDA_VERSION=${1:-cpu}
# create virtual environment and activate it
conda env create -f environment.yaml
# install requirements
pip install -r requirements.txt
# install pytorch
if [[ "$CUDA_VERSION" == "cpu" ]]; then
conda install pytorch==${PYTORCH_VERSION} cpuonly -y
elif [[ "$CUDA_VERSION" == 'cu92' ]]; then
conda install pytorch==${PYTORCH_VERSION} cudatoolkit=9.2 -y
elif [[ "$CUDA_VERSION" == 'cu100' ]]; then
conda install pytorch==${PYTORCH_VERSION} cudatoolkit=10.0 -y
elif [[ "$CUDA_VERSION" == 'cu101' ]]; then
conda install pytorch==${PYTORCH_VERSION} cudatoolkit=10.1 -y
fi
# install torch-geometric dependencies
pip install torch-scatter==latest+${CUDA_VERSION} -f https://pytorch-geometric.com/whl/torch-${PYTORCH_VERSION}.html
pip install torch-sparse==latest+${CUDA_VERSION} -f https://pytorch-geometric.com/whl/torch-${PYTORCH_VERSION}.html
pip install torch-cluster==latest+${CUDA_VERSION} -f https://pytorch-geometric.com/whl/torch-${PYTORCH_VERSION}.html
pip install torch-spline-conv==latest+${CUDA_VERSION} -f https://pytorch-geometric.com/whl/torch-${PYTORCH_VERSION}.html
pip install torch-geometric==1.6.1