forked from rses-singularity/caffe-cpu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity
51 lines (31 loc) · 928 Bytes
/
Singularity
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
Bootstrap: docker
From: bvlc/caffe:cpu
%environment
#Environment variables
#Use bash as default shell
SHELL=/bin/bash
#Add CUDA paths
CPATH="/usr/local/cuda/include:$CPATH"
PATH="/usr/local/cuda/bin:$PATH"
LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
CUDA_HOME="/usr/local/cuda"
#Add Caffe paths
CAFFE_ROOT="/opt/caffe"
PYCAFFE_ROOT="$CAFFE_ROOT/python"
PYTHONPATH="$PYCAFFE_ROOT:$PYTHONPATH"
PATH="$CAFFE_ROOT/build/tools:$PYCAFFE_ROOT:$PATH"
export PATH LD_LIBRARY_PATH CPATH CUDA_HOME CAFFE_ROOT PYCAFFE_ROOT PYTHONPATH
%setup
#Runs on host
#The path to the image is $SINGULARITY_ROOTFS
%post
#Post setup script
#Load environment variables
. /environment
#Default mount paths
mkdir /scratch /data /shared /fastdata
%runscript
#Executes with the singularity run command
#delete this section to use existing docker ENTRYPOINT command
%test
#Test that script is a success