forked from idekerlab/DrugCell
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDrugCell.def
executable file
·53 lines (40 loc) · 1.46 KB
/
DrugCell.def
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
48
49
50
51
52
53
Bootstrap: docker
From: pytorch/pytorch:1.12.0-cuda11.3-cudnn8-runtime
%labels
MANTAINER Rohan Gnanaolivu
%setup
cp ./src/Singularity_gpu_fix.sh $SINGULARITY_ROOTFS
# add local url of this repository for testing
%environment
PATH=$PATH:/usr/local/DrugCell
MODEL_DIR=/usr/local/DrugCell
CANDLE_DATA_DIR=/candle_data_dir
%post
apt-get update -y
apt-get install wget -y
apt-get install build-essential -y
apt-get install git -y
apt-get install vim -y
apt-get install subversion -y
# install gpu fix and clean up
cd /
chmod +x Singularity_gpu_fix.sh
./Singularity_gpu_fix.sh
rm Singularity_gpu_fix.sh
# these three need to be compiled and linked to the cuda libs.
# at the moment, what works for me is to build these in a
# singularity shell in a sandbox with the --nv flag to singularity set.
# create default internal candle_data_dir, map external candle_data_dir here
mkdir /candle_data_dir
#install python modules and model prerequites
pip install --upgrade pip
python3 -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 torchmetrics==0.11.1 --extra-index-url https://download.pytorch.org/whl/cu113
python3 -m pip install networkx
python3 -m pip install git+https://github.com/ECP-CANDLE/candle_lib@develop
cd /usr/local
git clone -b develop https://github.com/JDACS4C-IMPROVE/DrugCell.git
cd DrugCell
python3 -m pip install -r requirements.txt
chmod a+x *.sh
chmod a+x *.py
chmod -R 777 *.py