-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsingularity-ss-noddi.def
72 lines (55 loc) · 1.98 KB
/
singularity-ss-noddi.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
60
61
62
63
64
65
66
67
68
69
70
Bootstrap: docker
From: ubuntu:focal
%labels
AUTHOR siya sherif GIGA-CRC ivi ULiege
noddi-singularity version 1.0
matlab verison 2020b
using NODDI_toolbox_v1.05 : Gary Zang (UCL) http://mig.cs.ucl.ac.uk/index.php?n=Tutorial.NODDImatlab
%setup
mkdir -p /opt/ss_noddi
%files
# if using local
# ss_noddi_App /opt/ss_noddi/
%post
# upadate the packages
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get -y install \
wget unzip zip git openjdk-8-jre xvfb
apt-get clean
# MATLAB Compiled runtime
# create folder
mkdir /MCR
# get file
wget -nv -P /MCR https://ssd.mathworks.com/supportfiles/downloads/R2020b/Release/5/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2020b_Update_5_glnxa64.zip
# unzip
unzip -q /MCR/MATLAB_Runtime_R2020b_Update_5_glnxa64.zip -d /MCR/MCR_R2020b_tmp
# run install
/MCR/MCR_R2020b_tmp/install -mode silent -agreeToLicense yes
# delete residuals
rm -r /MCR/MCR_R2020b_tmp /MCR/MATLAB_Runtime_R2020b_Update_5_glnxa64.zip
rmdir /MCR
mkdir /In_fold && mkdir /Out_fold
# get the noddi standalone from the git branch
wget -nv -P /opt/ss_noddi https://github.com/CyclotronResearchCentre/NODDI_singularity/archive/refs/heads/main.zip
unzip -q /opt/ss_noddi/main.zip -d /opt/ss_noddi_tmp
cp -r /opt/ss_noddi_tmp/NODDI_singularity-main/ss_noddi_App/* /opt/ss_noddi/
rm -rf /opt/ss_noddi/main.zip
rm -rf /opt/ss_noddi_tmp
chmod ugo+rx /opt/ss_noddi/ss_noddi
chmod ugo+rx /opt/ss_noddi/run_ss_noddi.sh
%environment
%runscript
bash /opt/ss_noddi/run_ss_noddi.sh \
/usr/local/MATLAB/MATLAB_Runtime/v99 "$@"
%help
to run this container
singularity run --cleanenv \
--bind <your_folder>:/In_fold \
noddi-singularity.sif \
/In_fold/<NODDI image> \
/In_fold/<brain_mask> \
/In_fold/<NODDI_roi> \
/In_fold/<bval> \
/In_fold/<bvecs> \
/In_fold/<FittedParams.mat> \
/in_fold/<output_map>