@@ -15,65 +15,81 @@ RUN apt-get update && \
15
15
build-essential \
16
16
autoconf \
17
17
libtool \
18
- pkg-config && \
19
- curl -sSL http://neuro.debian.net/lists/xenial.us-ca.full >> /etc/apt/sources.list.d/neurodebian.sources.list && \
20
- apt-key add /root/.neurodebian.gpg && \
21
- (apt-key adv --refresh-keys --keyserver hkp://ha.pool.sks-keyservers.net 0xA5D32F012649A5A9 || true) && \
22
- apt-get update
18
+ pkg-config \
19
+ git && \
20
+ curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
21
+ apt-get install -y --no-install-recommends \
22
+ nodejs && \
23
+ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
24
+
25
+ # Install latest pandoc
26
+ RUN curl -o pandoc-2.2.2.1-1-amd64.deb -sSL "https://github.com/jgm/pandoc/releases/download/2.2.2.1/pandoc-2.2.2.1-1-amd64.deb" && \
27
+ dpkg -i pandoc-2.2.2.1-1-amd64.deb && \
28
+ rm pandoc-2.2.2.1-1-amd64.deb
23
29
24
30
# Installing freesurfer
25
31
RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.1/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1.tar.gz | tar zxv --no-same-owner -C /opt \
26
- --exclude='freesurfer/trctrain' \
32
+ --exclude='freesurfer/diffusion' \
33
+ --exclude='freesurfer/docs' \
34
+ --exclude='freesurfer/fsfast' \
35
+ --exclude='freesurfer/lib/cuda' \
36
+ --exclude='freesurfer/lib/qt' \
37
+ --exclude='freesurfer/matlab' \
38
+ --exclude='freesurfer/mni/share/man' \
27
39
--exclude='freesurfer/subjects/fsaverage_sym' \
28
40
--exclude='freesurfer/subjects/fsaverage3' \
29
41
--exclude='freesurfer/subjects/fsaverage4' \
30
42
--exclude='freesurfer/subjects/cvs_avg35' \
31
43
--exclude='freesurfer/subjects/cvs_avg35_inMNI152' \
32
44
--exclude='freesurfer/subjects/bert' \
45
+ --exclude='freesurfer/subjects/lh.EC_average' \
46
+ --exclude='freesurfer/subjects/rh.EC_average' \
47
+ --exclude='freesurfer/subjects/sample-*.mgz' \
33
48
--exclude='freesurfer/subjects/V1_average' \
34
- --exclude='freesurfer/average/mult-comp-cor' \
35
- --exclude='freesurfer/lib/cuda' \
36
- --exclude='freesurfer/lib/qt'
49
+ --exclude='freesurfer/trctrain'
37
50
38
- ENV FSL_DIR=/usr/share/fsl/5.0 \
39
- OS=Linux \
51
+ ENV FSL_DIR=" /usr/share/fsl/5.0" \
52
+ OS=" Linux" \
40
53
FS_OVERRIDE=0 \
41
- FIX_VERTEX_AREA= \
42
- FSF_OUTPUT_FORMAT=nii.gz \
43
- FREESURFER_HOME=/opt/freesurfer
44
- ENV SUBJECTS_DIR=$FREESURFER_HOME/subjects \
45
- FUNCTIONALS_DIR=$FREESURFER_HOME/sessions \
46
- MNI_DIR=$FREESURFER_HOME/mni \
47
- LOCAL_DIR=$FREESURFER_HOME/local \
48
- FSFAST_HOME=$FREESURFER_HOME/fsfast \
49
- MINC_BIN_DIR=$FREESURFER_HOME/mni/bin \
50
- MINC_LIB_DIR=$FREESURFER_HOME/mni/lib \
51
- MNI_DATAPATH=$FREESURFER_HOME/mni/data \
52
- FMRI_ANALYSIS_DIR=$FREESURFER_HOME/fsfast
53
- ENV PERL5LIB=$MINC_LIB_DIR/perl5/5.8.5 \
54
- MNI_PERL5LIB=$MINC_LIB_DIR/perl5/5.8.5 \
55
- PATH=$FREESURFER_HOME/bin:$FSFAST_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH
54
+ FIX_VERTEX_AREA="" \
55
+ FSF_OUTPUT_FORMAT="nii.gz" \
56
+ FREESURFER_HOME="/opt/freesurfer"
57
+ ENV SUBJECTS_DIR="$FREESURFER_HOME/subjects" \
58
+ FUNCTIONALS_DIR="$FREESURFER_HOME/sessions" \
59
+ MNI_DIR="$FREESURFER_HOME/mni" \
60
+ LOCAL_DIR="$FREESURFER_HOME/local" \
61
+ MINC_BIN_DIR="$FREESURFER_HOME/mni/bin" \
62
+ MINC_LIB_DIR="$FREESURFER_HOME/mni/lib" \
63
+ MNI_DATAPATH="$FREESURFER_HOME/mni/data"
64
+ ENV PERL5LIB="$MINC_LIB_DIR/perl5/5.8.5" \
65
+ MNI_PERL5LIB="$MINC_LIB_DIR/perl5/5.8.5" \
66
+ PATH="$FREESURFER_HOME/bin:$FSFAST_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH"
56
67
57
68
# Installing Neurodebian packages (FSL, AFNI, git)
69
+ RUN curl -sSL "http://neuro.debian.net/lists/$( lsb_release -c | cut -f2 ).us-ca.full" >> /etc/apt/sources.list.d/neurodebian.sources.list && \
70
+ apt-key add /root/.neurodebian.gpg && \
71
+ (apt-key adv --refresh-keys --keyserver hkp://ha.pool.sks-keyservers.net 0xA5D32F012649A5A9 || true)
72
+
58
73
RUN apt-get update && \
59
74
apt-get install -y --no-install-recommends \
60
75
fsl-core=5.0.9-5~nd16.04+1 \
61
- fsl-mni152-templates=5.0.7-2 \
62
76
afni=16.2.07~dfsg.1-5~nd16.04+1 \
63
- convert3d
64
-
65
- ENV FSLDIR=/usr/share/fsl/5.0 \
66
- FSLOUTPUTTYPE=NIFTI_GZ \
67
- FSLMULTIFILEQUIT=TRUE \
68
- POSSUMDIR=/usr/share/fsl/5.0 \
69
- LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH \
70
- FSLTCLSH=/usr/bin/tclsh \
71
- FSLWISH=/usr/bin/wish \
72
- AFNI_MODELPATH=/usr/lib/afni/models \
73
- AFNI_IMSAVE_WARNINGS=NO \
74
- AFNI_TTATLAS_DATASET=/usr/share/afni/atlases \
75
- AFNI_PLUGINPATH=/usr/lib/afni/plugins
76
- ENV PATH=/usr/lib/fsl/5.0:/usr/lib/afni/bin:$PATH
77
+ convert3d \
78
+ git-annex-standalone && \
79
+ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
80
+
81
+ ENV FSLDIR="/usr/share/fsl/5.0" \
82
+ FSLOUTPUTTYPE="NIFTI_GZ" \
83
+ FSLMULTIFILEQUIT="TRUE" \
84
+ POSSUMDIR="/usr/share/fsl/5.0" \
85
+ LD_LIBRARY_PATH="/usr/lib/fsl/5.0:$LD_LIBRARY_PATH" \
86
+ FSLTCLSH="/usr/bin/tclsh" \
87
+ FSLWISH="/usr/bin/wish" \
88
+ AFNI_MODELPATH="/usr/lib/afni/models" \
89
+ AFNI_IMSAVE_WARNINGS="NO" \
90
+ AFNI_TTATLAS_DATASET="/usr/share/afni/atlases" \
91
+ AFNI_PLUGINPATH="/usr/lib/afni/plugins"
92
+ ENV PATH="/usr/lib/fsl/5.0:/usr/lib/afni/bin:$PATH"
77
93
78
94
# Installing ANTs 2.2.0 (NeuroDocker build)
79
95
ENV ANTSPATH=/usr/lib/ants
@@ -123,8 +139,7 @@ RUN conda install -y python=3.7.1 \
123
139
libxslt=1.1.32 \
124
140
graphviz=2.40.1 \
125
141
traits=4.6.0 \
126
- # Make sure zlib is installed
127
- zlib; sync && \
142
+ zlib; sync && \
128
143
chmod -R a+rX /usr/local/miniconda; sync && \
129
144
chmod +x /usr/local/miniconda/bin/*; sync && \
130
145
conda clean --all -y; sync && \
@@ -134,49 +149,47 @@ RUN conda install -y python=3.7.1 \
134
149
RUN python -c "from matplotlib import font_manager" && \
135
150
sed -i 's/\( backend *: \) .*$/\1 Agg/g' $( python -c "import matplotlib; print(matplotlib.matplotlib_fname())" )
136
151
137
- # Installing Ubuntu packages and cleaning up
138
- RUN apt-get update && \
139
- apt-get install -y --no-install-recommends \
140
- git=1:2.7.4-0ubuntu1 && \
141
- apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
142
-
143
- # Install latest pandoc
144
- RUN curl -o pandoc-2.2.2.1-1-amd64.deb -sSL "https://github.com/jgm/pandoc/releases/download/2.2.2.1/pandoc-2.2.2.1-1-amd64.deb" && \
145
- dpkg -i pandoc-2.2.2.1-1-amd64.deb && \
146
- rm pandoc-2.2.2.1-1-amd64.deb
147
-
148
152
# Unless otherwise specified each process should only use one thread - nipype
149
153
# will handle parallelization
150
154
ENV MKL_NUM_THREADS=1 \
151
155
OMP_NUM_THREADS=1
152
156
153
- WORKDIR /root/
154
-
155
157
# Precaching atlases
156
- ENV CRN_SHARED_DATA /templateflow
157
- ADD docker/scripts/get_templates.sh get_templates.sh
158
- RUN mkdir $CRN_SHARED_DATA && \
159
- /root/get_templates.sh && \
160
- find $CRN_SHARED_DATA -type d -exec chmod 555 {} \; && \
161
- find $CRN_SHARED_DATA -type f -exec chmod 444 {} \; && \
162
- chmod +w $CRN_SHARED_DATA
158
+ WORKDIR /opt
159
+ ENV TEMPLATEFLOW_HOME="/opt/templateflow"
160
+ RUN pip install "datalad==0.10.0" && \
161
+ rm -rf ~/.cache/pip
162
+
163
+ RUN git config --global user.name "First Last" && \
164
+ git config --global user.email
"[email protected] " && \
165
+ datalad install -r https://github.com/templateflow/templateflow.git
166
+ RUN datalad get $TEMPLATEFLOW_HOME/tpl-MNI152NLin2009cAsym/*_T1w.nii.gz \
167
+ $TEMPLATEFLOW_HOME/tpl-MNI152NLin2009cAsym/*_desc-brain_mask.nii.gz \
168
+ $TEMPLATEFLOW_HOME/tpl-MNI152Lin/*_T1w.nii.gz \
169
+ $TEMPLATEFLOW_HOME/tpl-MNI152Lin/*_desc-brain_mask.nii.gz \
170
+ $TEMPLATEFLOW_HOME/tpl-OASIS30ANTs/*_T1w.nii.gz \
171
+ $TEMPLATEFLOW_HOME/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_desc-brain_mask.nii.gz \
172
+ $TEMPLATEFLOW_HOME/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_label-brain_probseg.nii.gz \
173
+ $TEMPLATEFLOW_HOME/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_desc-BrainCerebellumExtraction_mask.nii.gz
163
174
164
175
# Installing dev requirements (packages that are not in pypi)
165
- ADD requirements.txt requirements.txt
176
+ WORKDIR /src/
177
+ COPY requirements.txt requirements.txt
166
178
RUN pip install -r requirements.txt && \
167
179
rm -rf ~/.cache/pip
168
180
169
181
# Installing FMRIPREP
170
- COPY . /root/ src/fmriprep
182
+ COPY . /src/fmriprep
171
183
ARG VERSION
172
184
# Force static versioning within container
173
- RUN echo "${VERSION}" > /root/src/fmriprep/fmriprep/VERSION && \
174
- cd /root/src/fmriprep && \
185
+ RUN echo "${VERSION}" > /src/fmriprep/fmriprep/VERSION && \
186
+ echo "include fmriprep/VERSION" >> /src/fmriprep/MANIFEST.in && \
187
+ cd /src/fmriprep && \
175
188
pip install .[all] && \
176
189
rm -rf ~/.cache/pip
177
190
178
191
RUN install -m 0755 \
179
- /root/ src/fmriprep/scripts/generate_reference_mask.py \
192
+ /src/fmriprep/scripts/generate_reference_mask.py \
180
193
/usr/local/bin/generate_reference_mask
181
194
182
195
ENV IS_DOCKER_8395080871=1
@@ -189,8 +202,8 @@ ARG BUILD_DATE
189
202
ARG VCS_REF
190
203
ARG VERSION
191
204
LABEL org.label-schema.build-date=$BUILD_DATE \
192
- org.label-schema.name="FMRIPREP " \
193
- org.label-schema.description="FMRIPREP - robust fMRI preprocessing tool" \
205
+ org.label-schema.name="fMRIPrep " \
206
+ org.label-schema.description="fMRIPrep - robust fMRI preprocessing tool" \
194
207
org.label-schema.url="http://fmriprep.org" \
195
208
org.label-schema.vcs-ref=$VCS_REF \
196
209
org.label-schema.vcs-url="https://github.com/poldracklab/fmriprep" \
0 commit comments