-
Notifications
You must be signed in to change notification settings - Fork 18
/
install.sh
43 lines (36 loc) · 1.02 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
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
supported_cuda_versions=("false" "0" "10.2" "11.3")
cuda=""
while getopts ":c:" opt; do
case $opt in
c)
if [[ " ${supported_cuda_versions[*]} " == *" ${OPTARG} "* ]]; then
cuda="${OPTARG}"
fi
;;
:)
echo "Install pytorch with cpu version."
;;
\?)
echo "Invalid option: -$OPTARG."
;;
esac
done
if [[ " ${supported_cuda_versions[*]} " == *" ${cuda} "* ]]; then
echo "Install pytorch with cuda ${cuda} version."
else
echo "Install pytorch with cpu version."
fi
# Basic dependencies
pip install numpy pandas matplotlib networkx pyyaml tqdm ortools colorama
# PyTorch installation
pytorch_install_command="pytorch==1.11.0"
if [[ "${cuda}" != "" ]]; then
pytorch_install_command+=" cudatoolkit=${cuda}"
fi
echo -e "y" | conda install ${pytorch_install_command} -c pytorch
# Additional packages
pip install tensorboard
echo -e "y" | conda install pyg -c pyg -c conda-forge
pip install gym==0.22.0
pip install --force-reinstall scipy