-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
47 lines (41 loc) · 1.26 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
44
45
46
47
#!/bin/bash
mode="gpu"
# or use cpu
# mode="cpu"
#Check and install conda
conda_exe=$(which conda)
length_code=${#conda_exe}
if [ $length_code > 0 ]; then
echo "Anaconda or Miniconda found in: $conda_exe"
else
echo "No anaconda or miniconda, installing miniconda3 now ..."
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh
bash $HOME/miniconda.sh -b -p $HOME/miniconda3
echo ""
# add path to bashrc
echo "Add Miniconda3 to bashrc PATH variable. "
echo 'export PATH="$PATH:$HOME/miniconda3/bin"' >> $HOME/.bashrc
rm $HOME/miniconda.sh
# get current dir
current_dir=$(echo $PWD)
source $HOME/.bashrc
cd $current_dir
fi
#Create a python environment
conda create -n onionnet python=3.6 -y
source activate onionnet
#conda activate onionnet
#Install necessary python modules with conda
conda install -c rdkit rdkit -y
conda install -c omnia mdtraj -y
conda install -c openbabel openbabel -y
conda install biopandas -c conda-forge -y
conda install numpy pandas scipy scikit-learn -y
if [ mode == "gpu" ]; then
conda install tensorflow-gpu -y
else
conda install tensorflow -y
fi
#Finish installation
echo "Installation completed. To use the package, please enable the environment by: "
echo "conda activate onionnet"