forked from ReproNim/reproin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_container.sh
executable file
·38 lines (32 loc) · 1.4 KB
/
generate_container.sh
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
#!/bin/bash
set -eu
generate() {
#neurodocker generate "$1" \
docker run --rm kaczmarj/neurodocker:0.4.3 generate "$1" \
--base=neurodebian:stretch \
--pkg-manager=apt \
--ndfreeze date=20190114T160040Z \
--install vim wget strace time ncdu gnupg curl procps datalad pigz \
git-annex-standalone python-nipype virtualenv \
python-dcmstack python-configparser python-funcsigs \
python-pytest dcmtk python-pip python-wheel python-setuptools python-datalad \
heudiconv dcm2niix python-pytest \
--run "curl -sL https://deb.nodesource.com/setup_6.x | bash - "\
--install nodejs npm \
--run "npm install -g [email protected]" \
--run "mkdir /afs /inbox" \
--run "echo '#!/bin/bash' >> /neurodocker/heudiconv.sh && echo 'heudiconv \"\$@\"' >> /neurodocker/heudiconv.sh && chmod +x /neurodocker/heudiconv.sh" \
--user=reproin \
--entrypoint "/neurodocker/heudiconv.sh"
}
version=$(git describe)
generate docker > Dockerfile
generate singularity > Singularity
# Make versioned copy for Singularity Hub
cp Singularity Singularity.${version}
if echo $version | grep -e '-g'; then
echo "ERROR: Evil Yarik disabled updates of the containers without releases"
echo " So this command will 'fail', and if output is alright, reset, tag "
echo " (should match frozen version of heudiconv) and redo"
exit 1
fi