@@ -48,7 +48,7 @@ WORKDIR $ANTSPATH
48
48
RUN curl -sSL "https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz" \
49
49
| tar -xzC $ANTSPATH --strip-components 1
50
50
51
- # AFNI latest (neurodocker build)
51
+ # # AFNI latest (neurodocker build)
52
52
RUN apt-get update -qq \
53
53
&& apt-get install -y -q --no-install-recommends \
54
54
ed \
@@ -65,7 +65,7 @@ RUN apt-get update -qq \
65
65
xvfb \
66
66
&& apt-get clean \
67
67
&& rm -rf /var/lib/apt/lists/* \
68
- && curl -sSL --retry 5 -o /tmp/multiarch.deb http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.2_amd64 .deb \
68
+ && curl -sSL --retry 5 -o /tmp/multiarch.deb http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.5_amd64 .deb \
69
69
&& dpkg -i /tmp/multiarch.deb \
70
70
&& rm /tmp/multiarch.deb \
71
71
&& curl -sSL --retry 5 -o /tmp/libxp6.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
@@ -102,6 +102,19 @@ ENV PATH="/opt/afni-latest:$PATH" \
102
102
AFNI_IMSAVE_WARNINGS="NO" \
103
103
AFNI_PLUGINPATH="/opt/afni-latest"
104
104
105
+ # Install AFNI latest (neurodocker build)
106
+ ENV AFNI_DIR="/opt/afni"
107
+ RUN echo "Downloading AFNI ..." \
108
+ && mkdir -p ${AFNI_DIR} \
109
+ && curl -fsSL --retry 5 https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \
110
+ | tar -xz -C ${AFNI_DIR} --strip-components 1 \
111
+ # Keep only what we use
112
+ && find ${AFNI_DIR} -type f -not \( \
113
+ -name "3dTshift" -or \
114
+ -name "3dUnifize" -or \
115
+ -name "3dAutomask" -or \
116
+ -name "3dvolreg" \) -delete
117
+
105
118
# Convert3D (neurodocker build)
106
119
RUN echo "Downloading Convert3D ..." \
107
120
&& mkdir -p /opt/convert3d-1.0.0 \
@@ -113,7 +126,7 @@ RUN echo "Downloading Convert3D ..." \
113
126
ENV C3DPATH="/opt/convert3d-1.0.0" \
114
127
PATH="/opt/convert3d-1.0.0/bin:$PATH"
115
128
116
- # FSL 5 .0.11 (neurodocker build)
129
+ # FSL 6 .0.5.1
117
130
RUN apt-get update -qq \
118
131
&& apt-get install -y -q --no-install-recommends \
119
132
bc \
@@ -137,9 +150,9 @@ RUN apt-get update -qq \
137
150
&& apt-get clean \
138
151
&& rm -rf /var/lib/apt/lists/* \
139
152
&& echo "Downloading FSL ..." \
140
- && mkdir -p /opt/fsl-5.0.11 \
141
- && curl -fsSL --retry 5 https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5 .0.11-centos6_64 .tar.gz \
142
- | tar -xz -C /opt/fsl-5.0.11 --strip-components 1 \
153
+ && mkdir -p /opt/fsl \
154
+ && curl -fsSL --retry 5 https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6 .0.5.1-centos7_64 .tar.gz \
155
+ | tar -xz -C /opt/fsl --strip-components 1 \
143
156
--exclude "fsl/config" \
144
157
--exclude "fsl/data/atlases" \
145
158
--exclude "fsl/data/first" \
@@ -160,7 +173,7 @@ RUN apt-get update -qq \
160
173
--exclude "fsl/src" \
161
174
--exclude "fsl/tcl" \
162
175
--exclude "fsl/bin/FSLeyes" \
163
- && find /opt/fsl-5.0.11 /bin -type f -not \( \
176
+ && find /opt/fsl/bin -type f -not \( \
164
177
-name "applywarp" -or \
165
178
-name "bet" -or \
166
179
-name "bet2" -or \
@@ -183,19 +196,16 @@ RUN apt-get update -qq \
183
196
-name "susan" -or \
184
197
-name "topup" -or \
185
198
-name "zeropad" \) -delete \
186
- && find /opt/fsl-5.0.11 /data/standard -type f -not -name "MNI152_T1_2mm_brain.nii.gz" -delete
187
- ENV FSLDIR="/opt/fsl-5.0.11 " \
188
- PATH="/opt/fsl-5.0.11 /bin:$PATH" \
199
+ && find /opt/fsl/data/standard -type f -not -name "MNI152_T1_2mm_brain.nii.gz" -delete
200
+ ENV FSLDIR="/opt/fsl" \
201
+ PATH="/opt/fsl/bin:$PATH" \
189
202
FSLOUTPUTTYPE="NIFTI_GZ" \
190
203
FSLMULTIFILEQUIT="TRUE" \
191
- FSLTCLSH="/opt/fsl-5.0.11/bin/fsltclsh" \
192
- FSLWISH="/opt/fsl-5.0.11/bin/fslwish" \
193
204
FSLLOCKDIR="" \
194
205
FSLMACHINELIST="" \
195
206
FSLREMOTECALL="" \
196
207
FSLGECUDAQ="cuda.q" \
197
- POSSUMDIR="/opt/fsl-5.0.11" \
198
- LD_LIBRARY_PATH="/opt/fsl-5.0.11:$LD_LIBRARY_PATH"
208
+ LD_LIBRARY_PATH="/opt/fsl/lib:$LD_LIBRARY_PATH"
199
209
200
210
# Install FreeSurfer
201
211
RUN apt update && \
@@ -234,7 +244,7 @@ ENV PERL5LIB="$MINC_LIB_DIR/perl5/5.8.5" \
234
244
# remove build-stamp to play nice with nipype
235
245
236
246
# Installing SVGO and bids-validator
237
- RUN npm install -g svgo@^2.3 bids-validator@^1.8.4 \
247
+ RUN npm install -g svgo@^2.3 bids-validator@1.9.0 \
238
248
&& rm -rf ~/.npm ~/.empty /root/.npm
239
249
240
250
# ICA AROMA
@@ -250,42 +260,21 @@ RUN useradd -m -s /bin/bash -G users nibabies
250
260
WORKDIR /home/nibabies
251
261
ENV HOME="/home/nibabies"
252
262
263
+ COPY --from=nipreps/miniconda@sha256:ebbff214e6c9dc50ccc6fdbe679df1ffcbceaa45b47a75d6e34e8a064ef178da /opt/conda /opt/conda
264
+
253
265
# Installing and setting up miniconda
254
266
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-py38_4.9.2-Linux-x86_64.sh && \
255
267
bash Miniconda3-py38_4.9.2-Linux-x86_64.sh -b -p /usr/local/miniconda && \
256
268
rm Miniconda3-py38_4.9.2-Linux-x86_64.sh
257
269
258
270
# Set CPATH for packages relying on compiled libs (e.g. indexed_gzip)
259
- ENV PATH="/usr/local/miniconda /bin:$PATH" \
260
- CPATH="/usr/local/miniconda /include:$CPATH" \
271
+ ENV PATH="/opt/conda /bin:$PATH" \
272
+ CPATH="/opt/conda /include:$CPATH" \
261
273
PYTHONNOUSERSITE=1 \
262
274
MKL_NUM_THREADS=1 \
263
275
OMP_NUM_THREADS=1 \
264
276
IS_DOCKER_8395080871=1 \
265
- CONDA_PYTHON="/usr/local/miniconda/bin/python"
266
-
267
- # Installing precomputed python packages
268
- RUN conda install -y python=3.8 \
269
- pip=21.0 \
270
- mkl=2021.2 \
271
- mkl-service=2.3 \
272
- numpy=1.20 \
273
- scipy=1.6 \
274
- scikit-image=0.18 \
275
- scikit-learn=0.24 \
276
- matplotlib=3.3 \
277
- pandas=1.2 \
278
- libxslt=1.1 \
279
- traits=6.2 \
280
- zstd=1.4; sync && \
281
- chmod -R a+rX /usr/local/miniconda; sync && \
282
- chmod +x /usr/local/miniconda/bin/*; sync && \
283
- conda clean -y --all && sync && \
284
- rm -rf ~/.conda ~/.cache/pip/*; sync
285
-
286
- # Precaching fonts, set 'Agg' as default backend for matplotlib
287
- RUN ${CONDA_PYTHON} -c "from matplotlib import font_manager" && \
288
- sed -i 's/\( backend *: \) .*$/\1 Agg/g' $( ${CONDA_PYTHON} -c "import matplotlib; print(matplotlib.matplotlib_fname())" )
277
+ CONDA_PYTHON="/opt/conda/bin/python"
289
278
290
279
# Precaching atlases
291
280
COPY setup.cfg nibabies-setup.cfg
@@ -303,7 +292,7 @@ RUN echo "${VERSION}" > /src/nibabies/nibabies/VERSION && \
303
292
echo "include nibabies/VERSION" >> /src/nibabies/MANIFEST.in && \
304
293
${CONDA_PYTHON} -m pip install --no-cache-dir "/src/nibabies[all]"
305
294
306
- # ABI tags can interfere when running on Singularity
295
+ # ABI tags can interfere when running on Singularity/Apptainer
307
296
RUN strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
308
297
309
298
# Final settings
@@ -320,4 +309,4 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
320
309
org.label-schema.version=$VERSION \
321
310
org.label-schema.schema-version="1.0"
322
311
323
- ENTRYPOINT ["/usr/local/miniconda /bin/nibabies" ]
312
+ ENTRYPOINT ["/opt/conda /bin/nibabies" ]
0 commit comments