Skip to content

Commit 1359b0b

Browse files
committed
Update generation file
1 parent c60cefa commit 1359b0b

File tree

3 files changed

+87
-67
lines changed

3 files changed

+87
-67
lines changed

Dockerfile

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Generated by Neurodocker version 0.4.2-dev
2-
# Timestamp: 2018-10-15 12:01:29 UTC
1+
# Generated by Neurodocker version 0.5.0
2+
# Timestamp: 2019-07-14 08:54:07 UTC
33
#
44
# Thank you for using Neurodocker. If you discover any issues
55
# or ways to improve this software, please submit an issue or
@@ -24,7 +24,7 @@ RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
2424
locales \
2525
unzip \
2626
&& apt-get clean \
27-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
27+
&& rm -rf /var/lib/apt/lists/* \
2828
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
2929
&& dpkg-reconfigure --frontend=noninteractive locales \
3030
&& update-locale LANG="en_US.UTF-8" \
@@ -33,6 +33,7 @@ RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
3333
&& if [ ! -f "$ND_ENTRYPOINT" ]; then \
3434
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" \
3535
&& echo 'set -e' >> "$ND_ENTRYPOINT" \
36+
&& echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" \
3637
&& echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; \
3738
fi \
3839
&& chmod -R 777 /neurodocker && chmod a+s /neurodocker
@@ -59,14 +60,15 @@ RUN apt-get update -qq \
5960
octave \
6061
netbase \
6162
&& apt-get clean \
62-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
63+
&& rm -rf /var/lib/apt/lists/*
6364

6465
RUN sed -i '$isource /etc/fsl/fsl.sh' $ND_ENTRYPOINT
6566

6667
ENV FORCE_SPMMCR="1" \
6768
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/opt/matlabmcr-2010a/v713/runtime/glnxa64:/opt/matlabmcr-2010a/v713/bin/glnxa64:/opt/matlabmcr-2010a/v713/sys/os/glnxa64:/opt/matlabmcr-2010a/v713/extern/bin/glnxa64" \
6869
MATLABCMD="/opt/matlabmcr-2010a/v713/toolbox/matlab"
69-
RUN apt-get update -qq \
70+
RUN export TMPDIR="$(mktemp -d)" \
71+
&& apt-get update -qq \
7072
&& apt-get install -y -q --no-install-recommends \
7173
bc \
7274
libncurses5 \
@@ -75,18 +77,19 @@ RUN apt-get update -qq \
7577
libxpm-dev \
7678
libxt6 \
7779
&& apt-get clean \
78-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
80+
&& rm -rf /var/lib/apt/lists/* \
7981
&& echo "Downloading MATLAB Compiler Runtime ..." \
8082
&& curl -sSL --retry 5 -o /tmp/toinstall.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
8183
&& dpkg -i /tmp/toinstall.deb \
8284
&& rm /tmp/toinstall.deb \
8385
&& apt-get install -f \
8486
&& apt-get clean \
85-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
86-
&& curl -fsSL --retry 5 -o /tmp/MCRInstaller.bin https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin \
87-
&& chmod +x /tmp/MCRInstaller.bin \
88-
&& /tmp/MCRInstaller.bin -silent -P installLocation="/opt/matlabmcr-2010a" \
89-
&& rm -rf /tmp/* \
87+
&& rm -rf /var/lib/apt/lists/* \
88+
&& curl -fsSL --retry 5 -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin \
89+
&& chmod +x "$TMPDIR/MCRInstaller.bin" \
90+
&& "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="/opt/matlabmcr-2010a" \
91+
&& rm -rf "$TMPDIR" \
92+
&& unset TMPDIR \
9093
&& echo "Downloading standalone SPM ..." \
9194
&& curl -fsSL --retry 5 -o /tmp/spm12.zip http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7219_R2010a.zip \
9295
&& unzip -q /tmp/spm12.zip -d /tmp \
@@ -97,9 +100,11 @@ RUN apt-get update -qq \
97100
&& /opt/spm12-r7219/run_spm12.sh /opt/matlabmcr-2010a/v713 quit \
98101
&& sed -i '$iexport SPMMCRCMD=\"/opt/spm12-r7219/run_spm12.sh /opt/matlabmcr-2010a/v713 script\"' $ND_ENTRYPOINT
99102

100-
RUN useradd --no-user-group --create-home --shell /bin/bash neuro
103+
RUN test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro
101104
USER neuro
102105

106+
WORKDIR /home/neuro
107+
103108
ENV CONDA_DIR="/opt/miniconda-latest" \
104109
PATH="/opt/miniconda-latest/bin:$PATH"
105110
RUN export PATH="/opt/miniconda-latest/bin:$PATH" \
@@ -112,32 +117,32 @@ RUN export PATH="/opt/miniconda-latest/bin:$PATH" \
112117
&& conda config --system --prepend channels conda-forge \
113118
&& conda config --system --set auto_update_conda false \
114119
&& conda config --system --set show_channel_urls true \
115-
&& sync && conda clean -tipsy && sync \
120+
&& sync && conda clean --all && sync \
116121
&& conda create -y -q --name neuro \
117122
&& conda install -y -q --name neuro \
118-
python=3.6 \
119-
pytest \
120-
jupyter \
121-
jupyterlab \
122-
jupyter_contrib_nbextensions \
123-
traits \
124-
pandas \
125-
matplotlib \
126-
scikit-learn \
127-
scikit-image \
128-
seaborn \
129-
nbformat \
130-
nb_conda \
131-
&& sync && conda clean -tipsy && sync \
123+
'python=3.6' \
124+
'pytest' \
125+
'jupyter' \
126+
'jupyterlab' \
127+
'jupyter_contrib_nbextensions' \
128+
'traits' \
129+
'pandas' \
130+
'matplotlib' \
131+
'scikit-learn' \
132+
'scikit-image' \
133+
'seaborn' \
134+
'nbformat' \
135+
'nb_conda' \
136+
&& sync && conda clean --all && sync \
132137
&& bash -c "source activate neuro \
133138
&& pip install --no-cache-dir \
134-
https://github.com/nipy/nipype/tarball/master \
135-
https://github.com/INCF/pybids/tarball/0.6.5 \
136-
nilearn \
137-
datalad[full] \
138-
nipy \
139-
duecredit \
140-
nbval" \
139+
'https://github.com/nipy/nipype/tarball/master' \
140+
'https://github.com/INCF/pybids/tarball/0.6.5' \
141+
'nilearn' \
142+
'datalad[full]' \
143+
'nipy' \
144+
'duecredit' \
145+
'nbval'" \
141146
&& rm -rf ~/.cache/pip/* \
142147
&& sync \
143148
&& sed -i '$isource activate neuro' $ND_ENTRYPOINT
@@ -220,6 +225,10 @@ RUN echo '{ \
220225
\n "neuro" \
221226
\n ], \
222227
\n [ \
228+
\n "workdir", \
229+
\n "/home/neuro" \
230+
\n ], \
231+
\n [ \
223232
\n "miniconda", \
224233
\n { \
225234
\n "miniconda_version": "4.3.31", \

Singularity

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Generated by Neurodocker version 0.4.2-dev
2-
# Timestamp: 2018-10-15 12:01:30 UTC
1+
# Generated by Neurodocker version 0.5.0
2+
# Timestamp: 2019-07-14 08:54:09 UTC
33
#
44
# Thank you for using Neurodocker. If you discover any issues
55
# or ways to improve this software, please submit an issue or
@@ -21,7 +21,7 @@ apt-get install -y -q --no-install-recommends \
2121
locales \
2222
unzip
2323
apt-get clean
24-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
24+
rm -rf /var/lib/apt/lists/*
2525
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
2626
dpkg-reconfigure --frontend=noninteractive locales
2727
update-locale LANG="en_US.UTF-8"
@@ -30,6 +30,7 @@ mkdir -p /neurodocker
3030
if [ ! -f "$ND_ENTRYPOINT" ]; then
3131
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT"
3232
echo 'set -e' >> "$ND_ENTRYPOINT"
33+
echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT"
3334
echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT";
3435
fi
3536
chmod -R 777 /neurodocker && chmod a+s /neurodocker
@@ -54,10 +55,11 @@ apt-get install -y -q --no-install-recommends \
5455
octave \
5556
netbase
5657
apt-get clean
57-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
58+
rm -rf /var/lib/apt/lists/*
5859

5960
sed -i '$isource /etc/fsl/fsl.sh' $ND_ENTRYPOINT
6061

62+
export TMPDIR="$(mktemp -d)"
6163
apt-get update -qq
6264
apt-get install -y -q --no-install-recommends \
6365
bc \
@@ -67,18 +69,19 @@ apt-get install -y -q --no-install-recommends \
6769
libxpm-dev \
6870
libxt6
6971
apt-get clean
70-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
72+
rm -rf /var/lib/apt/lists/*
7173
echo "Downloading MATLAB Compiler Runtime ..."
7274
curl -sSL --retry 5 -o /tmp/toinstall.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb
7375
dpkg -i /tmp/toinstall.deb
7476
rm /tmp/toinstall.deb
7577
apt-get install -f
7678
apt-get clean
77-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
78-
curl -fsSL --retry 5 -o /tmp/MCRInstaller.bin https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin
79-
chmod +x /tmp/MCRInstaller.bin
80-
/tmp/MCRInstaller.bin -silent -P installLocation="/opt/matlabmcr-2010a"
81-
rm -rf /tmp/*
79+
rm -rf /var/lib/apt/lists/*
80+
curl -fsSL --retry 5 -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin
81+
chmod +x "$TMPDIR/MCRInstaller.bin"
82+
"$TMPDIR/MCRInstaller.bin" -silent -P installLocation="/opt/matlabmcr-2010a"
83+
rm -rf "$TMPDIR"
84+
unset TMPDIR
8285
echo "Downloading standalone SPM ..."
8386
curl -fsSL --retry 5 -o /tmp/spm12.zip http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7219_R2010a.zip
8487
unzip -q /tmp/spm12.zip -d /tmp
@@ -89,9 +92,11 @@ rm -rf /tmp/*
8992
/opt/spm12-r7219/run_spm12.sh /opt/matlabmcr-2010a/v713 quit
9093
sed -i '$iexport SPMMCRCMD=\"/opt/spm12-r7219/run_spm12.sh /opt/matlabmcr-2010a/v713 script\"' $ND_ENTRYPOINT
9194

92-
useradd --no-user-group --create-home --shell /bin/bash neuro
95+
test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro
9396
su - neuro
9497

98+
cd /home/neuro
99+
95100
export PATH="/opt/miniconda-latest/bin:$PATH"
96101
echo "Downloading Miniconda installer ..."
97102
conda_installer="/tmp/miniconda.sh"
@@ -102,32 +107,32 @@ conda update -yq -nbase conda
102107
conda config --system --prepend channels conda-forge
103108
conda config --system --set auto_update_conda false
104109
conda config --system --set show_channel_urls true
105-
sync && conda clean -tipsy && sync
110+
sync && conda clean --all && sync
106111
conda create -y -q --name neuro
107112
conda install -y -q --name neuro \
108-
python=3.6 \
109-
pytest \
110-
jupyter \
111-
jupyterlab \
112-
jupyter_contrib_nbextensions \
113-
traits \
114-
pandas \
115-
matplotlib \
116-
scikit-learn \
117-
scikit-image \
118-
seaborn \
119-
nbformat \
120-
nb_conda
121-
sync && conda clean -tipsy && sync
113+
'python=3.6' \
114+
'pytest' \
115+
'jupyter' \
116+
'jupyterlab' \
117+
'jupyter_contrib_nbextensions' \
118+
'traits' \
119+
'pandas' \
120+
'matplotlib' \
121+
'scikit-learn' \
122+
'scikit-image' \
123+
'seaborn' \
124+
'nbformat' \
125+
'nb_conda'
126+
sync && conda clean --all && sync
122127
bash -c "source activate neuro
123128
pip install --no-cache-dir \
124-
https://github.com/nipy/nipype/tarball/master \
125-
https://github.com/INCF/pybids/tarball/0.6.5 \
126-
nilearn \
127-
datalad[full] \
128-
nipy \
129-
duecredit \
130-
nbval"
129+
'https://github.com/nipy/nipype/tarball/master' \
130+
'https://github.com/INCF/pybids/tarball/0.6.5' \
131+
'nilearn' \
132+
'datalad[full]' \
133+
'nipy' \
134+
'duecredit' \
135+
'nbval'"
131136
rm -rf ~/.cache/pip/*
132137
sync
133138
sed -i '$isource activate neuro' $ND_ENTRYPOINT
@@ -212,6 +217,10 @@ echo '{
212217
\n "neuro"
213218
\n ],
214219
\n [
220+
\n "workdir",
221+
\n "/home/neuro"
222+
\n ],
223+
\n [
215224
\n "miniconda",
216225
\n {
217226
\n "miniconda_version": "4.3.31",

generate.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ generate_docker() {
1313
--add-to-entrypoint "source /etc/fsl/fsl.sh" \
1414
--spm12 version=r7219 \
1515
--user=neuro \
16+
--workdir /home/neuro \
1617
--miniconda miniconda_version="4.3.31" \
1718
conda_install="python=3.6 pytest jupyter jupyterlab jupyter_contrib_nbextensions
1819
traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \
@@ -51,6 +52,7 @@ generate_singularity() {
5152
--add-to-entrypoint "source /etc/fsl/fsl.sh" \
5253
--spm12 version=r7219 \
5354
--user=neuro \
55+
--workdir /home/neuro \
5456
--miniconda miniconda_version="4.3.31" \
5557
conda_install="python=3.6 pytest jupyter jupyterlab jupyter_contrib_nbextensions
5658
traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \

0 commit comments

Comments
 (0)