1
1
# Use Ubuntu 16.04 LTS
2
- FROM ubuntu:xenial-20191010
3
-
4
- # Pre-cache neurodebian key
5
- COPY .docker/neurodebian.gpg /usr/local/etc/neurodebian.gpg
2
+ FROM ubuntu:xenial-20201030
6
3
7
4
# Prepare environment
8
5
RUN apt-get update && \
9
6
apt-get install -y --no-install-recommends \
10
- curl \
7
+ autoconf \
8
+ build-essential \
11
9
bzip2 \
12
10
ca-certificates \
13
- xvfb \
11
+ curl \
14
12
cython3 \
15
- build-essential \
16
- autoconf \
13
+ git \
17
14
libtool \
15
+ lsb-release \
18
16
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 && \
17
+ xvfb && \
23
18
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
24
19
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
29
-
30
20
# Installing freesurfer
31
21
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 \
32
22
--exclude='freesurfer/diffusion' \
@@ -65,6 +55,8 @@ ENV PERL5LIB="$MINC_LIB_DIR/perl5/5.8.5" \
65
55
MNI_PERL5LIB="$MINC_LIB_DIR/perl5/5.8.5" \
66
56
PATH="$FREESURFER_HOME/bin:$FSFAST_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH"
67
57
58
+ # Pre-cache neurodebian key
59
+ COPY .docker/neurodebian.gpg /usr/local/etc/neurodebian.gpg
68
60
# Installing Neurodebian packages (FSL, AFNI, git)
69
61
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
62
apt-key add /usr/local/etc/neurodebian.gpg && \
@@ -75,8 +67,7 @@ RUN apt-get update && \
75
67
fsl-core=5.0.9-5~nd16.04+1 \
76
68
fsl-mni152-templates=5.0.7-2 \
77
69
afni=16.2.07~dfsg.1-5~nd16.04+1 \
78
- convert3d \
79
- git-annex-standalone && \
70
+ convert3d && \
80
71
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
81
72
82
73
ENV FSLDIR="/usr/share/fsl/5.0" \
@@ -110,14 +101,6 @@ RUN useradd -m -s /bin/bash -G users dmriprep
110
101
WORKDIR /home/dmriprep
111
102
ENV HOME="/home/dmriprep"
112
103
113
- # Installing SVGO
114
- RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
115
- RUN apt-get install -y nodejs
116
- RUN npm install -g svgo
117
-
118
- # Installing bids-validator
119
- RUN npm install -g
[email protected]
120
-
121
104
# Installing and setting up miniconda
122
105
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh && \
123
106
bash Miniconda3-4.5.11-Linux-x86_64.sh -b -p /usr/local/miniconda && \
@@ -131,18 +114,22 @@ ENV PATH="/usr/local/miniconda/bin:$PATH" \
131
114
PYTHONNOUSERSITE=1
132
115
133
116
# Installing precomputed python packages
134
- RUN conda install -y python=3.7 \
117
+ RUN conda install -y -c anaconda -c conda-forge \
118
+ python=3.7.1 \
135
119
graphviz=2.40 \
120
+ git-annex \
136
121
libxml2=2.9.8 \
137
122
libxslt=1.1.32 \
138
123
matplotlib=2.2 \
139
124
mkl \
140
125
mkl-service \
141
- numpy=1.19 \
126
+ nodejs \
127
+ numpy=1.20 \
128
+ pandoc=2.11 \
142
129
pip=20.3 \
143
- setuptools \
144
130
scikit-learn=0.19 \
145
131
scipy=1.5 \
132
+ setuptools=51.1 \
146
133
traits=4.6.0 \
147
134
zlib; sync && \
148
135
chmod -R a+rX /usr/local/miniconda; sync && \
@@ -159,17 +146,18 @@ ENV MKL_NUM_THREADS=1 \
159
146
RUN python -c "from matplotlib import font_manager" && \
160
147
sed -i 's/\( backend *: \) .*$/\1 Agg/g' $( python -c "import matplotlib; print(matplotlib.matplotlib_fname())" )
161
148
162
- # Precaching atlases
163
- COPY setup.cfg dmriprep-setup.cfg
164
- RUN pip install --no-cache-dir "$( grep templateflow dmriprep-setup.cfg | xargs )" && \
165
- python -c "from templateflow import api as tfapi; \
166
- tfapi.get('MNI152NLin6Asym', atlas=None, resolution=[1, 2], extension=['.nii', '.nii.gz']); \
167
- tfapi.get('MNI152NLin2009cAsym', atlas=None, extension=['.nii', '.nii.gz']); \
168
- tfapi.get('OASIS30ANTs', extension=['.nii', '.nii.gz']);" && \
169
- find $HOME/.cache/templateflow -type d -exec chmod go=u {} + && \
170
- find $HOME/.cache/templateflow -type f -exec chmod go=u {} +
171
-
172
- # Installing DMRIPREP
149
+ # Installing SVGO
150
+ RUN npm install -g svgo
151
+
152
+ # Installing bids-validator
153
+ RUN npm install -g
[email protected]
154
+
155
+ # Refresh linked libraries
156
+ RUN ldconfig
157
+
158
+ WORKDIR /src
159
+
160
+ # Installing dMRIPrep
173
161
COPY . /src/dmriprep
174
162
ARG VERSION
175
163
# Force static versioning within container
@@ -181,7 +169,6 @@ RUN echo "${VERSION}" > /src/dmriprep/dmriprep/VERSION && \
181
169
RUN find $HOME -type d -exec chmod go=u {} + && \
182
170
find $HOME -type f -exec chmod go=u {} +
183
171
184
- RUN ldconfig
185
172
WORKDIR /tmp/
186
173
ENTRYPOINT ["/usr/local/miniconda/bin/dmriprep" ]
187
174
0 commit comments