-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase_image_dockerfile
184 lines (171 loc) · 5.36 KB
/
base_image_dockerfile
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
# Generated by: Neurodocker version 0.7.0+0.gdc97516.dirty
# Latest release: Neurodocker version 0.9.5
# Timestamp: 2023/06/28 17:31:12 UTC
#
# Thank you for using Neurodocker. If you discover any issues
# or ways to improve this software, please submit an issue or
# pull request on our GitHub repository:
#
# https://github.com/ReproNim/neurodocker
FROM debian:bullseye
USER root
ARG DEBIAN_FRONTEND="noninteractive"
ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8" \
ND_ENTRYPOINT="/neurodocker/startup.sh"
RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
&& apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
apt-utils \
bzip2 \
ca-certificates \
curl \
jq \
locales \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG="en_US.UTF-8" \
&& chmod 777 /opt && chmod a+s /opt \
&& mkdir -p /neurodocker \
&& if [ ! -f "$ND_ENTRYPOINT" ]; then \
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" \
&& echo 'set -e' >> "$ND_ENTRYPOINT" \
&& echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" \
&& echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; \
fi \
&& chmod -R 777 /neurodocker && chmod a+s /neurodocker
ENTRYPOINT ["/neurodocker/startup.sh"]
ENV ANTSPATH="/opt/ants-2.4.1" \
PATH="/opt/ants-2.4.1:$PATH"
RUN echo "Downloading ANTs ..." \
&& curl -fsSL --retry 5 https://github.com/ANTsX/ANTs/releases/download/v2.4.1/ants-2.4.1-centos7-X64-gcc.zip -o ants.zip \
&& unzip ants.zip -d /opt \
&& mv /opt/ants-2.4.1/bin/* /opt/ants-2.4.1/ \
&& rm ants.zip
ENV FSLDIR="/opt/fsl-6.0.7.6" \
PATH="/opt/fsl-6.0.7.6/bin:$PATH" \
FSLOUTPUTTYPE="NIFTI_GZ" \
FSLMULTIFILEQUIT="TRUE" \
FSLTCLSH="/opt/fsl-6.0.7.6/bin/fsltclsh" \
FSLWISH="/opt/fsl-6.0.7.6/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 \
python3 \
sudo \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN echo "Installing FSL ..." \
&& curl -fsSL https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py | python3 - -d /opt/fsl-6.0.7.6 -V 6.0.7.6
ENV PATH="/opt/mrtrix3-3.0.4/bin:$PATH" \
LD_LIBRARY_PATH="/opt/mrtrix3-3.0.4/lib:$PATH"
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
ca-certificates \
g++ \
gcc \
git \
libeigen3-dev \
make \
python3 \
python3-numpy \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /opt/mrtrix3-3.0.4 \
&& git clone https://github.com/MRtrix3/mrtrix3.git /opt/mrtrix3-3.0.4 \
&& cd /opt/mrtrix3-3.0.4 \
&& git checkout 3.0.4 \
&& python3 configure -nogui \
&& echo "Compiling MRtrix3 ..." \
&& NUMBER_OF_PROCESSORS="1" python3 build
RUN bash -c '/opt/mrtrix3-3.0.4/set_path'
ENV C3DPATH="/opt/convert3d-1.0.0" \
PATH="/opt/convert3d-1.0.0/bin:$PATH"
RUN echo "Downloading Convert3D ..." \
&& mkdir -p /opt/convert3d-1.0.0 \
&& curl -fsSL --retry 5 https://sourceforge.net/projects/c3d/files/c3d/1.0.0/c3d-1.0.0-Linux-x86_64.tar.gz/download \
| tar -xz -C /opt/convert3d-1.0.0 --strip-components 1
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
gcc \
libc6-dev \
libopenblas-base \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
python3.9 \
python3-pip \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/python3.9 /usr/bin/python
RUN echo '{ \
\n "pkg_manager": "apt", \
\n "instructions": [ \
\n [ \
\n "base", \
\n "debian:bullseye" \
\n ], \
\n [ \
\n "ants", \
\n { \
\n "version": "2.4.1", \
\n "method": "binaries" \
\n } \
\n ], \
\n [ \
\n "fsl", \
\n { \
\n "version": "6.0.1", \
\n "method": "binaries" \
\n } \
\n ], \
\n [ \
\n "mrtrix3", \
\n { \
\n "version": "3.0.2", \
\n "method": "binaries" \
\n } \
\n ], \
\n [ \
\n "convert3d", \
\n { \
\n "version": "1.0.0", \
\n "method": "binaries" \
\n } \
\n ], \
\n [ \
\n "install", \
\n [ \
\n "gcc", \
\n "libc6-dev" \
\n ] \
\n ] \
\n ] \
\n}' > /neurodocker/neurodocker_specs.json