-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
127 lines (117 loc) · 3.66 KB
/
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
# Use Ubuntu 18.04 LTS (compatible with python-mvpa2 package)
FROM ubuntu:18.04
MAINTAINER Sajjad Torabian <torabiansajjad@gmail.com>
# Prepare environment
RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-utils \
autoconf \
build-essential \
bzip2 \
ca-certificates \
curl \
git \
libtool \
lsb-release \
netbase \
pkg-config \
unzip \
xvfb && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV DEBIAN_FRONTEND="noninteractive" \
LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8"
# FSL 6.0.5.1
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
bc \
dc \
file \
libfontconfig1 \
libfreetype6 \
libgl1-mesa-dev \
libgl1-mesa-dri \
libglu1-mesa-dev \
libgomp1 \
libice6 \
libxcursor1 \
libxft2 \
libxinerama1 \
libxrandr2 \
libxrender1 \
libxt6 \
sudo \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& echo "Downloading FSL ..." \
&& mkdir -p /opt/fsl-6.0.5.1 \
&& curl -fsSL --retry 5 https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.5.1-centos7_64.tar.gz \
| tar -xz -C /opt/fsl-6.0.5.1 --strip-components 1 \
--exclude "fsl/config" \
--exclude "fsl/data/atlases" \
--exclude "fsl/data/first" \
--exclude "fsl/data/mist" \
--exclude "fsl/data/possum" \
--exclude "fsl/data/standard/bianca" \
--exclude "fsl/data/standard/tissuepriors" \
--exclude "fsl/doc" \
--exclude "fsl/etc/default_flobs.flobs" \
--exclude "fsl/etc/fslconf" \
--exclude "fsl/etc/js" \
--exclude "fsl/etc/luts" \
--exclude "fsl/etc/matlab" \
--exclude "fsl/extras" \
--exclude "fsl/include" \
--exclude "fsl/python" \
--exclude "fsl/refdoc" \
--exclude "fsl/src" \
--exclude "fsl/tcl" \
--exclude "fsl/bin/FSLeyes" \
&& find /opt/fsl-6.0.5.1/bin -type f -not \( \
-name "applywarp" -or \
-name "bet" -or \
-name "bet2" -or \
-name "convert_xfm" -or \
-name "fast" -or \
-name "flirt" -or \
-name "fsl_regfilt" -or \
-name "fslhd" -or \
-name "fslinfo" -or \
-name "fslmaths" -or \
-name "fslmerge" -or \
-name "fslroi" -or \
-name "fslsplit" -or \
-name "fslstats" -or \
-name "imtest" -or \
-name "mcflirt" -or \
-name "melodic" -or \
-name "prelude" -or \
-name "remove_ext" -or \
-name "susan" -or \
-name "topup" -or \
-name "fslval" -or \
-name "zeropad" \) -delete \
&& find /opt/fsl-6.0.5.1/data/standard -type f -not -name "MNI152_T1_2mm_brain.nii.gz" -delete
ENV FSLDIR="/opt/fsl-6.0.5.1" \
PATH="/opt/fsl-6.0.5.1/bin:$PATH" \
FSLOUTPUTTYPE="NIFTI_GZ" \
FSLMULTIFILEQUIT="TRUE" \
FSLLOCKDIR="" \
FSLMACHINELIST="" \
FSLREMOTECALL="" \
FSLGECUDAQ="cuda.q" \
LD_LIBRARY_PATH="/opt/fsl-6.0.5.1/lib:$LD_LIBRARY_PATH"
# PyMVPA
RUN apt-get update && \
apt-get install -y --no-install-recommends python2.7
RUN apt-get update && \
mkdir /dev/fuse && \
chmod 777 /dev/fuse && \
apt-get install -y python-mvpa2 && \
apt-get remove -f -y --purge fuse
RUN mkdir -p /code
COPY run.py /code/run.py
RUN chmod +x /code/run.py
COPY version /code/version
ENTRYPOINT ["/code/run.py"]