-
Notifications
You must be signed in to change notification settings - Fork 1
/
Singularity.centos_torch2
71 lines (57 loc) · 1.75 KB
/
Singularity.centos_torch2
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
60
61
62
63
64
65
66
67
68
69
70
71
Bootstrap: docker
From: nvidia/cuda:10.0-cudnn7-runtime-centos7
%environment
SHELL=/bin/bash
export SHELL
export HDF5_USE_FILE_LOCKING='FALSE'
export PATH=/usr/local/cuda/bin:$PATH
export CPATH=/usr/local/cuda/include:$CPATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
%setup
# runs on host
# the path to the image is $SINGULARITY_ROOTFS
%post
# post-setup script
# load environment variables
. /environment
# use bash as default shell
echo 'SHELL=/bin/bash' >> /environment
# make environment file executable
chmod +x /environment
# default mount paths
mkdir /scratch
# fix this issue: https://github.com/singularityware/singularity/issues/1182#issuecomment-381796545
touch /usr/bin/nvidia-smi
#apt-get update && apt-get -y install locales
#locale-gen en_US.UTF-8
#apt-get install -y git wget
yum -y update
yum -y install yum-utils
yum -y groupinstall development
yum -y install epel-release
yum -y install dnf
yum -y install https://repo.ius.io/ius-release-el7.rpm
yum -y install python36u
yum -y install python36u-devel
yum -y install python36u-pip
yum -y install gcc gcc-c++ numpy python-devel scipy
pip3.6 install --upgrade pip
pip3.6 install pyyaml
pip3.6 install torch==1.3.0+cu100 torchvision==0.4.1+cu100 -f https://download.pytorch.org/whl/torch_stable.html
pip3.6 install Pillow
pip3.6 install matplotlib
pip3.6 install tqdm
pip3.6 install h5py
pip3.6 install pandas
pip3.6 install simpleitk
pip3.6 install comet_ml
pip install torch-scatter==1.4.0
pip install torch-sparse==0.4.3
pip install torch-cluster==1.4.5
pip install torch-spline-conv==1.1.1
pip install torch-geometric
%runscript
# executes with the singularity run command
# delete this section to use existing docker ENTRYPOINT command
%test
# test that script is a success