Created
April 23, 2017 01:44
-
-
Save chao1224/1e02b0127b1456a50d0931c4ef4a5108 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo Cluster $cluster | |
echo Process $process | |
echo RunningOn $runningon | |
mkdir $transfer_output_files | |
transfer_output_files=$transfer_output_files/$cluster | |
echo $transfer_output_files | |
mkdir $transfer_output_files | |
echo _CONDOR_JOB_IWD $_CONDOR_JOB_IWD | |
echo Cluster $cluster | |
echo Process $process | |
echo RunningOn $runningon | |
wget -q –retry-connrefused –waitretry=10 https://repo.continuum.io/archive/Anaconda2-4.3.1-Linux-x86_64.sh #here I get the anaconda file from squid | |
chmod 777 * #wget does strange things | |
./Anaconda2-4.3.1-Linux-x86_64.sh -b -p ./anaconda > /dev/null #install anaconda, I also add an argument to the directory name | |
export PATH=$PWD/anaconda/bin:$PATH | |
echo 'Done installing anaconda' | |
chmod 777 * | |
temp_env=temp | |
conda create -y -n $temp_env python=2.7 anaconda > /dev/null | |
source activate $temp_env | |
#keras stuff | |
conda install --yes -n $temp_env pyyaml > /dev/null | |
conda install --yes -n $temp_env HDF5 > /dev/null | |
conda install --yes -n $temp_env h5py > /dev/null | |
conda install --yes -n $temp_env -c rdonnelly libgpuarray > /dev/null | |
conda install --yes -n $temp_env -c rdonnelly pygpu > /dev/null | |
conda install --yes -n $temp_env -c rdonnelly theano > /dev/null | |
conda install --yes -n $temp_env -c conda-forge theano=0.8* > /dev/null | |
conda install --yes -n $temp_env -c conda-forge keras=1.2* > /dev/null | |
conda install --yes -n $temp_env scikit-learn=0.17* > /dev/null | |
conda install --yes -n $temp_env -c rdkit rdkit-postgresql > /dev/null | |
conda install --yes -n $temp_env -c r rpy2 > /dev/null | |
conda install --yes -n $temp_env -c bioconda r-prroc=1.1 > /dev/null | |
conda install --yes -n $temp_env -c auto croc > /dev/null | |
conda install --yes -n $temp_env pip > /dev/null | |
echo 'Done installing libraries' | |
chmod 777 -R ./anaconda | |
#get virtual-screening from github | |
curl -H "Authorization: token xxx" -L https://api.github.com/repos/chao1224/virtual-screening/zipball > virtual-screening-master.zip | |
unzip virtual-screening-master.zip > /dev/null | |
mv chao* virtual-screening | |
chmod 777 * | |
cp -r dataset/* virtual-screening/dataset/ | |
echo 'Done data preparation' | |
#run python job | |
cd virtual-screening | |
pip install --user -e . | |
KERAS_BACKEND=theano \ | |
python test/test_gpu.py >> $_CONDOR_JOB_IWD/$transfer_output_files/$process.out | |
echo 'Done running job' | |
date | |
source deactivate $temp_env | |
conda remove -n $temp_env -all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment