Skip to content

Commit 1a2a3c4

Browse files
author
jakubk
committed
regenerate dockerfiles
1 parent 70cf230 commit 1a2a3c4

File tree

3 files changed

+44
-49
lines changed

3 files changed

+44
-49
lines changed

Dockerfile

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Generated by Neurodocker v0.3.1-2-g4dfcf56.
1+
# Generated by Neurodocker v0.3.1-19-g8d02eb4.
22
#
33
# Thank you for using Neurodocker. If you discover any issues
44
# or ways to improve this software, please submit an issue or
55
# pull request on our GitHub repository:
66
# https://github.com/kaczmarj/neurodocker
77
#
8-
# Timestamp: 2017-10-02 22:55:57
8+
# Timestamp: 2017-11-06 21:15:09
99

1010
FROM kaczmarj/nipype:base
1111

@@ -54,15 +54,14 @@ RUN echo "Downloading Miniconda installer ..." \
5454
&& conda config --system --prepend channels conda-forge \
5555
&& conda config --system --set auto_update_conda false \
5656
&& conda config --system --set show_channel_urls true \
57-
&& conda update -y -q --all && sync \
5857
&& conda clean -tipsy && sync
5958

6059
#-------------------------
6160
# Create conda environment
6261
#-------------------------
6362
RUN conda create -y -q --name neuro \
64-
&& sync && conda clean -tipsy && sync
65-
ENV PATH=/opt/conda/envs/neuro/bin:$PATH
63+
&& sync && conda clean -tipsy && sync \
64+
&& sed -i '$isource activate neuro' $ND_ENTRYPOINT
6665

6766
COPY ["docker/files/run_builddocs.sh", "docker/files/run_examples.sh", "docker/files/run_pytests.sh", "nipype/external/fsl_imglob.py", "/usr/bin/"]
6867

@@ -71,7 +70,12 @@ COPY [".", "/src/nipype"]
7170
USER root
7271

7372
# User-defined instruction
74-
RUN chmod 777 -R /src/nipype
73+
RUN chown -R neuro /src \
74+
&& chmod +x /usr/bin/fsl_imglob.py /usr/bin/run_*.sh \
75+
&& . /etc/fsl/fsl.sh \
76+
&& ln -sf /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob \
77+
&& mkdir /work \
78+
&& chown neuro /work
7579

7680
USER neuro
7781

@@ -101,6 +105,15 @@ RUN conda install -y -q --name neuro python=${PYTHON_VERSION_MAJOR}.${PYTHON_VER
101105
&& pip install -q --no-cache-dir -e /src/nipype[all]" \
102106
&& sync
103107

108+
# User-defined BASH instruction
109+
RUN bash -c "mkdir -p /src/pybids \
110+
&& curl -sSL --retry 5 https://github.com/INCF/pybids/tarball/master \
111+
| tar -xz -C /src/pybids --strip-components 1 \
112+
&& source activate neuro \
113+
&& pip install --no-cache-dir -e /src/pybids"
114+
115+
WORKDIR /work
116+
104117
LABEL org.label-schema.build-date="$BUILD_DATE" \
105118
org.label-schema.name="NIPYPE" \
106119
org.label-schema.description="NIPYPE - Neuroimaging in Python: Pipelines and Interfaces" \
@@ -142,7 +155,7 @@ RUN echo '{ \
142155
\n "miniconda", \
143156
\n { \
144157
\n "env_name": "neuro", \
145-
\n "add_to_path": true \
158+
\n "activate": "true" \
146159
\n } \
147160
\n ], \
148161
\n [ \
@@ -168,7 +181,7 @@ RUN echo '{ \
168181
\n ], \
169182
\n [ \
170183
\n "run", \
171-
\n "chmod 777 -R /src/nipype" \
184+
\n "chown -R neuro /src\\n&& chmod +x /usr/bin/fsl_imglob.py /usr/bin/run_*.sh\\n&& . /etc/fsl/fsl.sh\\n&& ln -sf /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob\\n&& mkdir /work\\n&& chown neuro /work" \
172185
\n ], \
173186
\n [ \
174187
\n "user", \
@@ -194,6 +207,14 @@ RUN echo '{ \
194207
\n } \
195208
\n ], \
196209
\n [ \
210+
\n "run_bash", \
211+
\n "mkdir -p /src/pybids\\n && curl -sSL --retry 5 https://github.com/INCF/pybids/tarball/master\\n | tar -xz -C /src/pybids --strip-components 1\\n && source activate neuro\\n && pip install --no-cache-dir -e /src/pybids" \
212+
\n ], \
213+
\n [ \
214+
\n "workdir", \
215+
\n "/work" \
216+
\n ], \
217+
\n [ \
197218
\n "label", \
198219
\n { \
199220
\n "org.label-schema.build-date": "$BUILD_DATE", \
@@ -207,6 +228,6 @@ RUN echo '{ \
207228
\n } \
208229
\n ] \
209230
\n ], \
210-
\n "generation_timestamp": "2017-10-02 22:55:57", \
211-
\n "neurodocker_version": "0.3.1-2-g4dfcf56" \
231+
\n "generation_timestamp": "2017-11-06 21:15:09", \
232+
\n "neurodocker_version": "0.3.1-19-g8d02eb4" \
212233
\n}' > /neurodocker/neurodocker_specs.json

docker/Dockerfile.base

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Generated by Neurodocker v0.3.1-2-g4dfcf56.
1+
# Generated by Neurodocker v0.3.1-19-g8d02eb4.
22
#
33
# Thank you for using Neurodocker. If you discover any issues
44
# or ways to improve this software, please submit an issue or
55
# pull request on our GitHub repository:
66
# https://github.com/kaczmarj/neurodocker
77
#
8-
# Timestamp: 2017-10-02 22:55:55
8+
# Timestamp: 2017-11-06 21:15:07
99

10-
FROM neurodebian@sha256:b09c09faa34bca0ea096b9360ee5121e048594cb8e2d7744d7d546ade88a2996
10+
FROM neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b
1111

1212
ARG DEBIAN_FRONTEND=noninteractive
1313

@@ -64,7 +64,7 @@ ENV MATLABCMD=/opt/mcr/v92/toolbox/matlab \
6464
#--------------------
6565
ENV PATH=/opt/afni:$PATH
6666
RUN apt-get update -qq && apt-get install -yq --no-install-recommends ed gsl-bin libglu1-mesa-dev libglib2.0-0 libglw1-mesa \
67-
libgomp1 libjpeg62 libxm4 netpbm tcsh xfonts-base xvfb \
67+
libgomp1 libjpeg62 libxm4 netpbm tcsh xfonts-base xvfb python \
6868
&& libs_path=/usr/lib/x86_64-linux-gnu \
6969
&& if [ -f $libs_path/libgsl.so.19 ]; then \
7070
ln $libs_path/libgsl.so.19 $libs_path/libgsl.so.0; \
@@ -106,6 +106,7 @@ RUN apt-get update -qq \
106106
&& apt-get install -y -q --no-install-recommends ants \
107107
apt-utils \
108108
bzip2 \
109+
convert3d \
109110
file \
110111
fsl-core \
111112
fsl-mni152-templates \
@@ -126,21 +127,9 @@ RUN sed -i '$isource /etc/fsl/fsl.sh' $ND_ENTRYPOINT
126127
ENV ANTSPATH="/usr/lib/ants" \
127128
PATH="/usr/lib/ants:$PATH"
128129

129-
#------------------------
130-
# Install Convert3D 1.0.0
131-
#------------------------
132-
RUN echo "Downloading C3D ..." \
133-
&& mkdir /opt/c3d \
134-
&& curl -sSL --retry 5 https://sourceforge.net/projects/c3d/files/c3d/1.0.0/c3d-1.0.0-Linux-x86_64.tar.gz/download \
135-
| tar -xzC /opt/c3d --strip-components=1
136-
ENV C3DPATH=/opt/c3d \
137-
PATH=/opt/c3d/bin:$PATH
138-
139130
# User-defined instruction
140131
RUN gem install fakes3
141132

142-
WORKDIR /work
143-
144133
#--------------------------------------
145134
# Save container specifications to JSON
146135
#--------------------------------------
@@ -150,7 +139,7 @@ RUN echo '{ \
150139
\n "instructions": [ \
151140
\n [ \
152141
\n "base", \
153-
\n "neurodebian@sha256:b09c09faa34bca0ea096b9360ee5121e048594cb8e2d7744d7d546ade88a2996" \
142+
\n "neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b" \
154143
\n ], \
155144
\n [ \
156145
\n "label", \
@@ -168,7 +157,8 @@ RUN echo '{ \
168157
\n [ \
169158
\n "afni", \
170159
\n { \
171-
\n "version": "latest" \
160+
\n "version": "latest", \
161+
\n "install_python2": "true" \
172162
\n } \
173163
\n ], \
174164
\n [ \
@@ -188,6 +178,7 @@ RUN echo '{ \
188178
\n "ants", \
189179
\n "apt-utils", \
190180
\n "bzip2", \
181+
\n "convert3d", \
191182
\n "file", \
192183
\n "fsl-core", \
193184
\n "fsl-mni152-templates", \
@@ -215,20 +206,10 @@ RUN echo '{ \
215206
\n } \
216207
\n ], \
217208
\n [ \
218-
\n "c3d", \
219-
\n { \
220-
\n "version": "1.0.0" \
221-
\n } \
222-
\n ], \
223-
\n [ \
224-
\n "instruction", \
225-
\n "RUN gem install fakes3" \
226-
\n ], \
227-
\n [ \
228-
\n "workdir", \
229-
\n "/work" \
209+
\n "run", \
210+
\n "gem install fakes3" \
230211
\n ] \
231212
\n ], \
232-
\n "generation_timestamp": "2017-10-02 22:55:55", \
233-
\n "neurodocker_version": "0.3.1-2-g4dfcf56" \
213+
\n "generation_timestamp": "2017-11-06 21:15:07", \
214+
\n "neurodocker_version": "0.3.1-19-g8d02eb4" \
234215
\n}' > /neurodocker/neurodocker_specs.json

docker/generate_dockerfiles.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,6 @@ function generate_base_dockerfile() {
8080
}
8181

8282

83-
# The Dockerfile ADD/COPY instructions do not honor the current user, so the
84-
# owner of the directories has to be manually changed to user neuro.
85-
# See https://github.com/moby/moby/issues/6119 for more information on this
86-
# behavior.
87-
# Docker plans on changing this behavior by added a `--chown` flag to the
88-
# ADD/COPY commands. See https://github.com/moby/moby/pull/34263.
89-
9083
function generate_main_dockerfile() {
9184
docker run --rm "$NEURODOCKER_IMAGE" generate \
9285
--base "$NIPYPE_BASE_IMAGE" --pkg-manager "$PKG_MANAGER" \

0 commit comments

Comments
 (0)