1
- # Generated by Neurodocker v0.3.2.
2
- #
1
+ # Generated by Neurodocker version 0.4.0.dev2
2
+ # Timestamp: 2018-05-18 14:48:41 UTC
3
+ #
3
4
# Thank you for using Neurodocker. If you discover any issues
4
5
# or ways to improve this software, please submit an issue or
5
6
# pull request on our GitHub repository:
7
+ #
6
8
# https://github.com/kaczmarj/neurodocker
7
- #
8
- # Timestamp: 2018-05-16 09:31:36
9
9
10
10
FROM neurodebian:stretch-non-free
11
11
12
- ARG DEBIAN_FRONTEND=noninteractive
12
+ ARG DEBIAN_FRONTEND=" noninteractive"
13
13
14
- # ----------------------------------------------------------
15
- # Install common dependencies and create default entrypoint
16
- # ----------------------------------------------------------
17
14
ENV LANG="en_US.UTF-8" \
18
- LC_ALL="C .UTF-8" \
15
+ LC_ALL="en_US .UTF-8" \
19
16
ND_ENTRYPOINT="/neurodocker/startup.sh"
20
- RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
21
- apt-utils bzip2 ca-certificates curl locales unzip \
17
+ RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
18
+ && apt-get update -qq \
19
+ && apt-get install -y -q --no-install-recommends \
20
+ apt-utils \
21
+ bzip2 \
22
+ ca-certificates \
23
+ curl \
24
+ locales \
25
+ unzip \
22
26
&& apt-get clean \
23
27
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
24
- && localedef --force --inputfile=en_US --charmap=UTF-8 C.UTF-8 \
28
+ && sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
29
+ && dpkg-reconfigure --frontend=noninteractive locales \
30
+ && update-locale LANG="en_US.UTF-8" \
25
31
&& chmod 777 /opt && chmod a+s /opt \
26
32
&& mkdir -p /neurodocker \
27
33
&& if [ ! -f "$ND_ENTRYPOINT" ]; then \
28
- echo '#!/usr/bin/env bash' >> $ND_ENTRYPOINT \
29
- && echo 'set +x ' >> $ND_ENTRYPOINT \
30
- && echo 'if [ -z "$* " ]; then /usr/bin/env bash; else $*; fi' >> $ND_ENTRYPOINT; \
31
- fi \
34
+ echo '#!/usr/bin/env bash' >> " $ND_ENTRYPOINT" \
35
+ && echo 'set -e ' >> " $ND_ENTRYPOINT" \
36
+ && echo 'if [ -n "$1 " ]; then "$@"; else /usr/bin/env bash; fi' >> " $ND_ENTRYPOINT" ; \
37
+ fi \
32
38
&& chmod -R 777 /neurodocker && chmod a+s /neurodocker
39
+
33
40
ENTRYPOINT ["/neurodocker/startup.sh" ]
34
41
35
42
RUN apt-get update -qq \
36
- && apt-get install -y -q --no-install-recommends convert3d \
37
- ants \
38
- fsl \
39
- gcc \
40
- g++ \
41
- graphviz \
42
- tree \
43
- git-annex-standalone \
44
- vim \
45
- emacs-nox \
46
- nano \
47
- less \
48
- ncdu \
49
- tig \
50
- git-annex-remote-rclone \
51
- octave \
43
+ && apt-get install -y -q --no-install-recommends \
44
+ convert3d \
45
+ ants \
46
+ fsl \
47
+ gcc \
48
+ g++ \
49
+ graphviz \
50
+ tree \
51
+ git-annex-standalone \
52
+ vim \
53
+ emacs-nox \
54
+ nano \
55
+ less \
56
+ ncdu \
57
+ tig \
58
+ git-annex-remote-rclone \
59
+ octave \
52
60
&& apt-get clean \
53
61
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
54
62
55
- # Add command(s) to entrypoint
56
63
RUN sed -i '$isource /etc/fsl/fsl.sh' $ND_ENTRYPOINT
57
64
58
- # ----------------------
59
- # Install MCR and SPM12
60
- # ----------------------
61
- # Install MATLAB Compiler Runtime
62
- RUN apt-get update -qq && apt-get install -yq --no-install-recommends libxext6 libxt6 \
65
+ ENV FORCE_SPMMCR="1" \
66
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/opt/matlabmcr-2018a/v94/runtime/glnxa64:/opt/matlabmcr-2018a/v94/bin/glnxa64:/opt/matlabmcr-2018a/v94/sys/os/glnxa64:/opt/matlabmcr-2018a/v94/extern/bin/glnxa64" \
67
+ MATLABCMD="/opt/matlabmcr-2018a/v94/toolbox/matlab"
68
+ RUN apt-get update -qq \
69
+ && apt-get install -y -q --no-install-recommends \
70
+ bc \
71
+ libxext6 \
72
+ libxpm-dev \
73
+ libxt6 \
63
74
&& apt-get clean \
64
75
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
65
76
&& echo "Downloading MATLAB Compiler Runtime ..." \
66
- && curl -sSL --retry 5 -o /tmp/mcr.zip https://www .mathworks.com/supportfiles/downloads/R2017a /deployment_files/R2017a /installers/glnxa64/MCR_R2017a_glnxa64_installer .zip \
77
+ && curl -fsSL --retry 5 -o /tmp/mcr.zip https://ssd .mathworks.com/supportfiles/downloads/R2018a /deployment_files/R2018a /installers/glnxa64/MCR_R2018a_glnxa64_installer .zip \
67
78
&& unzip -q /tmp/mcr.zip -d /tmp/mcrtmp \
68
- && /tmp/mcrtmp/install -destinationFolder /opt/mcr -mode silent -agreeToLicense yes \
69
- && rm -rf /tmp/*
79
+ && /tmp/mcrtmp/install -destinationFolder /opt/matlabmcr-2018a -mode silent -agreeToLicense yes \
80
+ && rm -rf /tmp/* \
81
+ && echo "Downloading standalone SPM ..." \
82
+ && curl -fsSL --retry 5 -o /tmp/spm12.zip http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_latest_Linux_R2018a.zip \
83
+ && unzip -q /tmp/spm12.zip -d /tmp \
84
+ && mkdir -p /opt/spm12-dev \
85
+ && mv /tmp/spm12/* /opt/spm12-dev/ \
86
+ && chmod -R 777 /opt/spm12-dev \
87
+ && rm -rf /tmp/* \
88
+ && /opt/spm12-dev/run_spm12.sh /opt/matlabmcr-2018a/v94 quit \
89
+ && sed -i '$iexport SPMMCRCMD=\" /opt/spm12-dev/run_spm12.sh /opt/matlabmcr-2018a/v94 script\" ' $ND_ENTRYPOINT
70
90
71
- # Install standalone SPM
72
- RUN echo "Downloading standalone SPM ..." \
73
- && curl -sSL --retry 5 -o spm.zip http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_latest_Linux_R2017a.zip \
74
- && unzip -q spm.zip -d /opt \
75
- && chmod -R 777 /opt/spm* \
76
- && rm -rf spm.zip \
77
- && /opt/spm12/run_spm12.sh /opt/mcr/v92/ quit \
78
- && sed -i '$iexport SPMMCRCMD=\" /opt/spm12/run_spm12.sh /opt/mcr/v92/ script\" ' $ND_ENTRYPOINT
79
- ENV MATLABCMD=/opt/mcr/v92/toolbox/matlab \
80
- FORCE_SPMMCR=1 \
81
- LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/opt/mcr/v92/runtime/glnxa64:/opt/mcr/v92/bin/glnxa64:/opt/mcr/v92/sys/os/glnxa64:$LD_LIBRARY_PATH
82
-
83
- # Create new user: neuro
84
91
RUN useradd --no-user-group --create-home --shell /bin/bash neuro
85
92
USER neuro
86
93
87
- # ------------------
88
- # Install Miniconda
89
- # ------------------
90
- ENV CONDA_DIR=/opt/conda \
91
- PATH=/opt/conda/bin:$PATH
92
- RUN echo "Downloading Miniconda installer ..." \
93
- && miniconda_installer=/tmp/miniconda.sh \
94
- && curl -sSL --retry 5 -o $miniconda_installer https://repo.continuum.io/miniconda/Miniconda3-4.3.31-Linux-x86_64.sh \
95
- && /bin/bash $miniconda_installer -b -p $CONDA_DIR \
96
- && rm -f $miniconda_installer \
94
+ ENV CONDA_DIR="/opt/miniconda-latest" \
95
+ PATH="/opt/miniconda-latest/bin:$PATH"
96
+ RUN export PATH="/opt/miniconda-latest/bin:$PATH" \
97
+ && echo "Downloading Miniconda installer ..." \
98
+ && conda_installer="/tmp/miniconda.sh" \
99
+ && curl -fsSL --retry 5 -o "$conda_installer" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
100
+ && bash "$conda_installer" -b -p /opt/miniconda-latest \
101
+ && rm -f "$conda_installer" \
102
+ && conda update -yq -nbase conda \
97
103
&& conda config --system --prepend channels conda-forge \
98
104
&& conda config --system --set auto_update_conda false \
99
105
&& conda config --system --set show_channel_urls true \
100
- && conda clean -tipsy && sync
101
-
102
- # -------------------------
103
- # Create conda environment
104
- # -------------------------
105
- RUN conda create -y -q --name neuro python=3.6 \
106
- pytest \
107
- jupyter \
108
- jupyterlab \
109
- jupyter_contrib_nbextensions \
110
- traits \
111
- pandas \
112
- matplotlib \
113
- scikit-learn \
114
- scikit-image \
115
- seaborn \
116
- nbformat \
117
- nb_conda \
118
106
&& sync && conda clean -tipsy && sync \
119
- && /bin/bash -c "source activate neuro \
120
- && pip install -q --no-cache-dir https://github.com/nipy/nipype/tarball/master \
121
- https://github.com/INCF/pybids/tarball/master \
122
- nilearn \
123
- datalad[full] \
124
- nipy \
125
- duecredit" \
107
+ && conda create -y -q --name neuro \
108
+ && conda install -y -q --name neuro \
109
+ python=3.6 \
110
+ pytest \
111
+ jupyter \
112
+ jupyterlab \
113
+ jupyter_contrib_nbextensions \
114
+ traits \
115
+ pandas \
116
+ matplotlib \
117
+ scikit-learn \
118
+ scikit-image \
119
+ seaborn \
120
+ nbformat \
121
+ nb_conda \
122
+ && sync && conda clean -tipsy && sync \
123
+ && bash -c "source activate neuro \
124
+ && pip install --no-cache-dir \
125
+ https://github.com/nipy/nipype/tarball/master \
126
+ https://github.com/INCF/pybids/tarball/master \
127
+ nilearn \
128
+ datalad[full] \
129
+ nipy \
130
+ duecredit" \
131
+ && rm -rf ~/.cache/pip/* \
126
132
&& sync \
127
133
&& sed -i '$isource activate neuro' $ND_ENTRYPOINT
128
134
129
- # User-defined BASH instruction
130
- RUN bash -c "source activate neuro && jupyter nbextension enable exercise2/main && jupyter nbextension enable spellchecker/main"
135
+ RUN bash -c 'source activate neuro && jupyter nbextension enable exercise2/main && jupyter nbextension enable spellchecker/main'
131
136
132
137
USER root
133
138
134
- # User-defined instruction
135
139
RUN mkdir /data && chmod 777 /data && chmod a+s /data
136
140
137
- # User-defined instruction
138
141
RUN mkdir /output && chmod 777 /output && chmod a+s /output
139
142
140
143
USER neuro
141
144
142
- # User-defined instruction
143
145
RUN printf
"[user]\n\t name = miykael\n\t email = [email protected] \n " > ~/.gitconfig
144
146
145
- # User-defined BASH instruction
146
- RUN bash -c "source activate neuro && cd /data && datalad install -r ///workshops/nih-2017/ds000114 && cd ds000114 && datalad update -r && datalad get -r sub-01/ses-test/anat sub-01/ses-test/func/*fingerfootlips*"
147
+ RUN bash -c 'source activate neuro && cd /data && datalad install -r ///workshops/nih-2017/ds000114 && cd ds000114 && datalad update -r && datalad get -r sub-01/ses-test/anat sub-01/ses-test/func/*fingerfootlips*'
147
148
148
- # User-defined instruction
149
149
RUN curl -L https://files.osf.io/v1/resources/fvuh8/providers/osfstorage/580705089ad5a101f17944a9 -o /data/ds000114/derivatives/fmriprep/mni_icbm152_nlin_asym_09c.tar.gz && tar xf /data/ds000114/derivatives/fmriprep/mni_icbm152_nlin_asym_09c.tar.gz -C /data/ds000114/derivatives/fmriprep/. && rm /data/ds000114/derivatives/fmriprep/mni_icbm152_nlin_asym_09c.tar.gz && find /data/ds000114/derivatives/fmriprep/mni_icbm152_nlin_asym_09c -type f -not -name ?mm_T1.nii.gz -not -name ?mm_brainmask.nii.gz -not -name ?mm_tpm*.nii.gz -delete
150
150
151
151
COPY ["." , "/home/neuro/nipype_tutorial" ]
152
152
153
153
USER root
154
154
155
- # User-defined instruction
156
155
RUN chown -R neuro /home/neuro/nipype_tutorial
157
156
158
- # User-defined instruction
159
157
RUN rm -rf /opt/conda/pkgs/*
160
158
161
159
USER neuro
162
160
163
- # User-defined instruction
164
161
RUN mkdir -p ~/.jupyter && echo c.NotebookApp.ip = \" 0.0.0.0\" > ~/.jupyter/jupyter_notebook_config.py
165
162
166
163
WORKDIR /home/neuro/nipype_tutorial
167
164
168
165
CMD ["jupyter-notebook" ]
169
166
170
- # --------------------------------------
171
- # Save container specifications to JSON
172
- # --------------------------------------
173
167
RUN echo '{ \
174
168
\n "pkg_manager": "apt", \
175
- \n "check_urls": false, \
176
169
\n "instructions": [ \
177
170
\n [ \
178
171
\n "base", \
@@ -201,15 +194,12 @@ RUN echo '{ \
201
194
\n ], \
202
195
\n [ \
203
196
\n "add_to_entrypoint", \
204
- \n [ \
205
- \n "source /etc/fsl/fsl.sh" \
206
- \n ] \
197
+ \n "source /etc/fsl/fsl.sh" \
207
198
\n ], \
208
199
\n [ \
209
- \n "spm ", \
200
+ \n "spm12 ", \
210
201
\n { \
211
- \n "version": "12", \
212
- \n "matlab_version": "R2017a" \
202
+ \n "version": "dev" \
213
203
\n } \
214
204
\n ], \
215
205
\n [ \
@@ -220,9 +210,30 @@ RUN echo '{ \
220
210
\n "miniconda", \
221
211
\n { \
222
212
\n "miniconda_version": "4.3.31", \
223
- \n "conda_install": "python=3.6 pytest jupyter jupyterlab jupyter_contrib_nbextensions traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda", \
224
- \n "pip_install": "https://github.com/nipy/nipype/tarball/master https://github.com/INCF/pybids/tarball/master nilearn datalad[full] nipy duecredit", \
225
- \n "env_name": "neuro", \
213
+ \n "conda_install": [ \
214
+ \n "python=3.6", \
215
+ \n "pytest", \
216
+ \n "jupyter", \
217
+ \n "jupyterlab", \
218
+ \n "jupyter_contrib_nbextensions", \
219
+ \n "traits", \
220
+ \n "pandas", \
221
+ \n "matplotlib", \
222
+ \n "scikit-learn", \
223
+ \n "scikit-image", \
224
+ \n "seaborn", \
225
+ \n "nbformat", \
226
+ \n "nb_conda" \
227
+ \n ], \
228
+ \n "pip_install": [ \
229
+ \n "https://github.com/nipy/nipype/tarball/master", \
230
+ \n "https://github.com/INCF/pybids/tarball/master", \
231
+ \n "nilearn", \
232
+ \n "datalad[full]", \
233
+ \n "nipy", \
234
+ \n "duecredit" \
235
+ \n ], \
236
+ \n "create_env": "neuro", \
226
237
\n "activate": true \
227
238
\n } \
228
239
\n ], \
@@ -295,7 +306,5 @@ RUN echo '{ \
295
306
\n "jupyter-notebook" \
296
307
\n ] \
297
308
\n ] \
298
- \n ], \
299
- \n "generation_timestamp": "2018-05-16 09:31:36", \
300
- \n "neurodocker_version": "0.3.2" \
309
+ \n ] \
301
310
\n }' > /neurodocker/neurodocker_specs.json
0 commit comments