-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathinstall.sh
42 lines (35 loc) · 995 Bytes
/
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
supported_cuda_versions=(false, 0, 10.2, 11.3)
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.\n"
else
echo "Install pytorch with cpu version.\n"
fi
# basic
pip install numpy pandas matplotlib networkx pyyaml tqdm ortools colorama
# for DL
if [[ "${supported_cuda_versions[@]}" =~ "${cuda}" ]] ; then
echo -e "y" | conda install pytorch==1.11.0 cudatoolkit=${cuda} -c pytorch
else
echo -e "y" | conda install pytorch==1.11.0 -c pytorch
fi
pip install tensorboard
# for GNN
echo -e "y" | conda install pyg -c pyg -c conda-forge
# for RL
pip install gym=0.21.0
pip install --force-reinstall scipy