forked from khanlab/gradcorrect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity.0.0.1h
70 lines (51 loc) · 1.58 KB
/
Singularity.0.0.1h
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
Bootstrap: docker
From: ubuntu:xenial
#note: install_afni_fsl_sudo.sh solves error message when run itksnap: LibGlu.so.1
#run freesurfer's freeview
# if libQtOpenGL.so.4, run sudo apt-get libqt4-dev
# if missing: libjpeg.so.62, run apt-get install libjpeg62
#create image
#rm ~/neuroglia/neuroglia.img && singularity create --size 20000 ~/neuroglia/neuroglia.img && sudo singularity bootstrap ~/neuroglia/neuroglia.img Singularity
#########
%setup
#########
mkdir -p $SINGULARITY_ROOTFS/gradcorrect
cp -Rv . $SINGULARITY_ROOTFS/gradcorrect
#########
%post
#########
cd /gradcorrect/deps
export DEBIAN_FRONTEND=noninteractive
bash 00.install_basics_sudo.sh
bash 03.install_anaconda2_nipype_dcmstack_by_binary.sh /opt
bash 10.install_afni_fsl_sudo.sh
bash 12.install_c3d_by_binary.sh
bash 16.install_ants_by_binary.sh /opt
bash 25.install_niftyreg_by_source.sh /opt
bash 28.install_gradunwarp_by_source.sh /opt
#########
%environment
#anaconda2
export PATH=/opt/anaconda2/bin/:$PATH
#fsl
export FSLDIR=/usr/share/fsl/5.0
export POSSUMDIR=$FSLDIR
export PATH=/usr/lib/fsl/5.0:$PATH
export FSLOUTPUTTYPE=NIFTI_GZ
export FSLMULTIFILEQUIT=TRUE
export FSLTCLSH=/usr/bin/tclsh
export FSLWISH=/usr/bin/wish
export FSLBROWSER=/etc/alternatives/x-www-browser
export LD_LIBRARY_PATH=/usr/lib/fsl/5.0:${LD_LIBRARY_PATH}
#c3d
export PATH=/opt/c3d/bin:$PATH
#ants
export PATH=/opt/ants:$PATH
export ANTSPATH=/opt/ants
#niftyreg
export LD_LIBRARY_PATH=/opt/niftyreg-1.3.9/lib:$LD_LIBRARY_PATH
export PATH=/opt/niftyreg-1.3.9/bin:$PATH
#this app:
export PATH=/gradcorrect:$PATH
%runscript
exec /gradcorrect/run.sh $@