forked from TangYiChing/PathDSP
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPathDSP.def
59 lines (45 loc) · 1.79 KB
/
PathDSP.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
54
55
56
57
58
59
Bootstrap: docker
From: pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
%labels
MANTAINER Yuanhang Liu
%setup
cp ./src/Singularity_gpu_fix.sh $SINGULARITY_ROOTFS
# add local url of this repository for testing
%environment
export PATH=$PATH:/usr/local/PathDSP
export IMPROVE_MODEL_DIR=/usr/local/PathDSP
export CANDLE_DATA_DIR=/candle_data_dir
export AUTHOR_DATA_DIR=/candle_data_dir
export PYTHONPATH=$PYTHONPATH:/usr/local/IMPROVE/:/usr/local/PathDSP/PathDSP/
%post
apt-get update -y
apt-get install wget -y
apt-get install -y gnupg
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F60F4B3D7FA2AF80
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A4B469963BF863CC
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
cd /usr/local
git clone https://github.com/JDACS4C-IMPROVE/IMPROVE.git
git clone -b develop https://github.com/JDACS4C-IMPROVE/PathDSP.git
cd PathDSP
# download conda
/opt/conda/bin/conda env create -f environment_082223.yml --prefix /usr/local/conda_envs/PathDSP_env/
#/opt/conda/bin/conda activate PathDSP_env
/usr/local/conda_envs/PathDSP_env/bin/pip install git+https://github.com/ECP-CANDLE/candle_lib@develop
cp *.sh /usr/local/bin
chmod a+x /usr/local/bin/*.sh
chmod a+x /usr/local/PathDSP/*.sh