-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_v0.1
256 lines (254 loc) · 12.1 KB
/
Dockerfile_v0.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# Generated by Neurodocker and Reproenv.
FROM debian:buster-slim
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/opt/afni-latest:$PATH" \
AFNI_PLUGINPATH="/opt/afni-latest"
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
ca-certificates \
curl \
ed \
gsl-bin \
libgl1-mesa-dri \
libglib2.0-0 \
libglu1-mesa-dev \
libglw1-mesa \
libgomp1 \
libjpeg62 \
libxm4 \
multiarch-support \
netpbm \
tcsh \
xfonts-base \
xvfb \
&& rm -rf /var/lib/apt/lists/* \
&& _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)" \
&& curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
&& apt-get install --yes -q "${_reproenv_tmppath}" \
&& rm "${_reproenv_tmppath}" \
&& _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)" \
&& curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb \
&& apt-get install --yes -q "${_reproenv_tmppath}" \
&& rm "${_reproenv_tmppath}" \
&& apt-get update -qq \
&& apt-get install --yes --quiet --fix-missing \
&& rm -rf /var/lib/apt/lists/* \
&& gsl_path="$(find / -name 'libgsl.so.??' || printf '')" \
&& if [ -n "$gsl_path" ]; then \
ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0"; \
fi \
&& ldconfig \
&& mkdir -p /opt/afni-latest \
&& echo "Downloading AFNI ..." \
&& curl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \
| tar -xz -C /opt/afni-latest --strip-components 1
ENV FSLDIR="/opt/fsl-6.0.4" \
PATH="/opt/fsl-6.0.4/bin:$PATH" \
FSLOUTPUTTYPE="NIFTI_GZ" \
FSLMULTIFILEQUIT="TRUE" \
FSLTCLSH="/opt/fsl-6.0.4/bin/fsltclsh" \
FSLWISH="/opt/fsl-6.0.4/bin/fslwish" \
FSLLOCKDIR="" \
FSLMACHINELIST="" \
FSLREMOTECALL="" \
FSLGECUDAQ="cuda.q"
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
bc \
ca-certificates \
curl \
dc \
file \
libfontconfig1 \
libfreetype6 \
libgl1-mesa-dev \
libgl1-mesa-dri \
libglu1-mesa-dev \
libgomp1 \
libice6 \
libopenblas-base \
libxcursor1 \
libxft2 \
libxinerama1 \
libxrandr2 \
libxrender1 \
libxt6 \
nano \
sudo \
wget \
&& rm -rf /var/lib/apt/lists/* \
&& echo "Downloading FSL ..." \
&& mkdir -p /opt/fsl-6.0.4 \
&& curl -fL https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.4-centos6_64.tar.gz \
| tar -xz -C /opt/fsl-6.0.4 --strip-components 1 \
&& echo "Installing FSL conda environment ..." \
&& bash /opt/fsl-6.0.4/etc/fslconf/fslpython_install.sh -f /opt/fsl-6.0.4
ENV ANTSPATH="/opt/ants-2.3.4/" \
PATH="/opt/ants-2.3.4:$PATH"
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/* \
&& echo "Downloading ANTs ..." \
&& mkdir -p /opt/ants-2.3.4 \
&& curl -fsSL https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz \
| tar -xz -C /opt/ants-2.3.4 --strip-components 1
RUN mkdir -p /PUMI/data_out
ENV CONDA_DIR="/opt/miniconda-latest" \
PATH="/opt/miniconda-latest/bin:$PATH"
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
bzip2 \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/* \
# Install dependencies.
&& export PATH="/opt/miniconda-latest/bin:$PATH" \
&& echo "Downloading Miniconda installer ..." \
&& conda_installer="/tmp/miniconda.sh" \
&& curl -fsSL -o "$conda_installer" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& bash "$conda_installer" -b -p /opt/miniconda-latest \
&& rm -f "$conda_installer" \
&& conda update -yq -nbase conda \
# Prefer packages in conda-forge
&& conda config --system --prepend channels conda-forge \
# Packages in lower-priority channels not considered if a package with the same
# name exists in a higher priority channel. Can dramatically speed up installations.
# Conda recommends this as a default
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html
&& conda config --set channel_priority strict \
&& conda config --system --set auto_update_conda false \
&& conda config --system --set show_channel_urls true \
# Enable `conda activate`
&& conda init bash \
&& conda install -c anaconda pip \
&& bash -c "source activate base \
&& python -m pip install --no-cache-dir \
"dot2tex>=2.11.3" \
"templateflow>=0.8.0" \
"graphviz>=0.17" \
"matplotlib==3.5.2" \
"numpy>=1.21.1" \
"scipy>=1.7.1" \
"numpydoc>=1.1.0" \
"nbsphinx>=0.8.6" \
"pytest==7.1.2" \
"nipype>=1.8.1" \
"neurodocker==0.8.0" \
"nilearn==0.9.1" \
"pybids>=0.15.1" \
"poetry>=1.1.13" \
"poetry-dynamic-versioning>=0.17.1" \
"pydeface>=2.0.0" \
"seaborn>=0.11.2" \
"scikit-learn==1.1.2" \
"tensorflow" \
"graphviz" \
"numpydoc" \
"nbsphinx" \
"dot2tex" \
"git+https://github.com/MIC-DKFZ/HD-BET"" \
# Clean up
&& sync && conda clean --all --yes && sync \
&& rm -rf ~/.cache/pip/*
# Save specification to JSON.
RUN printf '{ \
"pkg_manager": "apt", \
"existing_users": [ \
"root" \
], \
"instructions": [ \
{ \
"name": "from_", \
"kwds": { \
"base_image": "debian:buster-slim" \
} \
}, \
{ \
"name": "install", \
"kwds": { \
"pkgs": [ \
"git" \
], \
"opts": null \
} \
}, \
{ \
"name": "run", \
"kwds": { \
"command": "apt-get update -qq \\\\\\n && apt-get install -y -q --no-install-recommends \\\\\\n git \\\\\\n && rm -rf /var/lib/apt/lists/*" \
} \
}, \
{ \
"name": "env", \
"kwds": { \
"PATH": "/opt/afni-latest:$PATH", \
"AFNI_PLUGINPATH": "/opt/afni-latest" \
} \
}, \
{ \
"name": "run", \
"kwds": { \
"command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n ca-certificates \\\\\\n curl \\\\\\n ed \\\\\\n gsl-bin \\\\\\n libgl1-mesa-dri \\\\\\n libglib2.0-0 \\\\\\n libglu1-mesa-dev \\\\\\n libglw1-mesa \\\\\\n libgomp1 \\\\\\n libjpeg62 \\\\\\n libxm4 \\\\\\n multiarch-support \\\\\\n netpbm \\\\\\n tcsh \\\\\\n xfonts-base \\\\\\n xvfb\\nrm -rf /var/lib/apt/lists/*\\n_reproenv_tmppath=\\"$\(mktemp -t tmp.XXXXXXXXXX.deb\)\\"\\ncurl -fsSL --retry 5 -o \\"${_reproenv_tmppath}\\" http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb\\napt-get install --yes -q \\"${_reproenv_tmppath}\\"\\nrm \\"${_reproenv_tmppath}\\"\\n_reproenv_tmppath=\\"$\(mktemp -t tmp.XXXXXXXXXX.deb\)\\"\\ncurl -fsSL --retry 5 -o \\"${_reproenv_tmppath}\\" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%%2Bdeb7u2_amd64.deb\\napt-get install --yes -q \\"${_reproenv_tmppath}\\"\\nrm \\"${_reproenv_tmppath}\\"\\napt-get update -qq\\napt-get install --yes --quiet --fix-missing\\nrm -rf /var/lib/apt/lists/*\\ngsl_path=\\"$\(find / -name 'libgsl.so.??' || printf ''\)\\"\\nif [ -n \\"$gsl_path\\" ]; then \\\\\\n ln -sfv \\"$gsl_path\\" \\"$\(dirname $gsl_path\)/libgsl.so.0\\"; \\\\\\nfi\\nldconfig\\nmkdir -p /opt/afni-latest\\necho \\"Downloading AFNI ...\\"\\ncurl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \\\\\\n| tar -xz -C /opt/afni-latest --strip-components 1" \
} \
}, \
{ \
"name": "env", \
"kwds": { \
"FSLDIR": "/opt/fsl-6.0.4", \
"PATH": "/opt/fsl-6.0.4/bin:$PATH", \
"FSLOUTPUTTYPE": "NIFTI_GZ", \
"FSLMULTIFILEQUIT": "TRUE", \
"FSLTCLSH": "/opt/fsl-6.0.4/bin/fsltclsh", \
"FSLWISH": "/opt/fsl-6.0.4/bin/fslwish", \
"FSLLOCKDIR": "", \
"FSLMACHINELIST": "", \
"FSLREMOTECALL": "", \
"FSLGECUDAQ": "cuda.q" \
} \
}, \
{ \
"name": "run", \
"kwds": { \
"command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n bc \\\\\\n ca-certificates \\\\\\n curl \\\\\\n dc \\\\\\n file \\\\\\n libfontconfig1 \\\\\\n libfreetype6 \\\\\\n libgl1-mesa-dev \\\\\\n libgl1-mesa-dri \\\\\\n libglu1-mesa-dev \\\\\\n libgomp1 \\\\\\n libice6 \\\\\\n libopenblas-base \\\\\\n libxcursor1 \\\\\\n libxft2 \\\\\\n libxinerama1 \\\\\\n libxrandr2 \\\\\\n libxrender1 \\\\\\n libxt6 \\\\\\n nano \\\\\\n sudo \\\\\\n wget\\nrm -rf /var/lib/apt/lists/*\\necho \\"Downloading FSL ...\\"\\nmkdir -p /opt/fsl-6.0.4\\ncurl -fL https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.4-centos6_64.tar.gz \\\\\\n| tar -xz -C /opt/fsl-6.0.4 --strip-components 1 \\necho \\"Installing FSL conda environment ...\\"\\nbash /opt/fsl-6.0.4/etc/fslconf/fslpython_install.sh -f /opt/fsl-6.0.4" \
} \
}, \
{ \
"name": "env", \
"kwds": { \
"ANTSPATH": "/opt/ants-2.3.4/", \
"PATH": "/opt/ants-2.3.4:$PATH" \
} \
}, \
{ \
"name": "run", \
"kwds": { \
"command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n ca-certificates \\\\\\n curl\\nrm -rf /var/lib/apt/lists/*\\necho \\"Downloading ANTs ...\\"\\nmkdir -p /opt/ants-2.3.4\\ncurl -fsSL https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz \\\\\\n| tar -xz -C /opt/ants-2.3.4 --strip-components 1" \
} \
}, \
{ \
"name": "run", \
"kwds": { \
"command": "mkdir -p /PUMI/data_out" \
} \
}, \
{ \
"name": "env", \
"kwds": { \
"CONDA_DIR": "/opt/miniconda-latest", \
"PATH": "/opt/miniconda-latest/bin:$PATH" \
} \
}, \
{ \
"name": "run", \
"kwds": { \
"command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n bzip2 \\\\\\n ca-certificates \\\\\\n curl\\nrm -rf /var/lib/apt/lists/*\\n# Install dependencies.\\nexport PATH=\\"/opt/miniconda-latest/bin:$PATH\\"\\necho \\"Downloading Miniconda installer ...\\"\\nconda_installer=\\"/tmp/miniconda.sh\\"\\ncurl -fsSL -o \\"$conda_installer\\" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh\\nbash \\"$conda_installer\\" -b -p /opt/miniconda-latest\\nrm -f \\"$conda_installer\\"\\nconda update -yq -nbase conda\\n# Prefer packages in conda-forge\\nconda config --system --prepend channels conda-forge\\n# Packages in lower-priority channels not considered if a package with the same\\n# name exists in a higher priority channel. Can dramatically speed up installations.\\n# Conda recommends this as a default\\n# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html\\nconda config --set channel_priority strict\\nconda config --system --set auto_update_conda false\\nconda config --system --set show_channel_urls true\\n# Enable `conda activate`\\nconda init bash\\nbash -c \\"source activate base\\n python -m pip install --no-cache-dir \\\\\\n \\"poetry\\" \\\\\\n \\"tensorflow\\" \\\\\\n \\"graphviz\\" \\\\\\n \\"numpydoc\\" \\\\\\n \\"nbsphinx\\" \\\\\\n \\"dot2tex\\" \\\\\\n \\"git+https://github.com/MIC-DKFZ/HD-BET\\"\\"\\n# Clean up\\nsync && conda clean --all --yes && sync\\nrm -rf ~/.cache/pip/*" \
} \
} \
] \
}' > /.reproenv.json
# End saving to specification to JSON.