-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
executable file
·121 lines (104 loc) · 4.05 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
FROM ubuntu:16.04
MAINTAINER Will Tackett <[email protected]>
# Make directory for flywheel spec (v0)
ENV FLYWHEEL /flywheel/v0
RUN mkdir -p ${FLYWHEEL}
# Set the entrypoint
ENTRYPOINT ["/flywheel/v0/run.sh"]
# Pre-cache neurodebian key
COPY docker/files/neurodebian.gpg /usr/local/etc/neurodebian.gpg
# Prepare environment
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
bzip2 \
ca-certificates \
xvfb \
cython3 \
build-essential \
autoconf \
libtool \
pkg-config \
jq \
zip \
unzip \
nano \
git && \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get install -y --no-install-recommends \
nodejs && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Installing and setting up miniconda
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh && \
bash Miniconda3-4.5.11-Linux-x86_64.sh -b -p /usr/local/miniconda && \
rm Miniconda3-4.5.11-Linux-x86_64.sh
ENV PATH=/usr/local/miniconda/bin:$PATH \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PYTHONNOUSERSITE=1
# Installing Neurodebian packages (FSL, AFNI, git)
RUN curl -sSL "http://neuro.debian.net/lists/$( lsb_release -c | cut -f2 ).us-ca.full" >> /etc/apt/sources.list.d/neurodebian.sources.list && \
apt-key add /usr/local/etc/neurodebian.gpg && \
(apt-key adv --refresh-keys --keyserver hkp://ha.pool.sks-keyservers.net 0xA5D32F012649A5A9 || true)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
fsl-core=5.0.9-5~nd16.04+1 \
fsl-mni152-templates=5.0.7-2 \
afni=16.2.07~dfsg.1-5~nd16.04+1 \
git-annex-standalone && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV FSLDIR=/usr/share/fsl/5.0 \
PATH=/usr/share/fsl/5.0:${PATH} \
PATH=/usr/share/fsl/5.0/bin:${PATH} \
FSLOUTPUTTYPE="NIFTI_GZ" \
FSLMULTIFILEQUIT="TRUE" \
LD_LIBRARY_PATH="/usr/lib/fsl/5.0:$LD_LIBRARY_PATH"
ENV AFNI_INSTALLDIR=/usr/lib/afni \
PATH=/usr/lib/afni/bin:${PATH} \
AFNI_PLUGINPATH=/usr/lib/afni/plugins \
AFNI_MODELPATH=/usr/lib/afni/models \
AFNI_TTATLAS_DATASET=/usr/share/afni/atlases \
AFNI_IMSAVE_WARNINGS=NO
# Installing precomputed python packages
RUN conda install -y python=3.7.1 \
numpy=1.15.4 \
scipy=1.2.0 \
mkl=2019.1 \
mkl-service \
scikit-learn=0.20.2 \
matplotlib=2.2.3 \
seaborn=0.9.0 \
pandas=0.24.0 \
libxml2=2.9.9 \
graphviz=2.40.1 \
traits=4.6.0 \
jinja2=2.11.2 \
zlib; sync && \
chmod -R a+rX /usr/local/miniconda; sync && \
chmod +x /usr/local/miniconda/bin/*; sync && \
conda build purge-all; sync && \
conda clean -tipsy && sync
RUN pip install 'flywheel-sdk==12.*'
RUN pip install pandas
RUN pip install pybids
RUN pip install --no-cache fw-heudiconv==0.3.3 \
&& pip install --no-cache nipype \
&& pip install --no-cache nilearn \
&& pip install --no-cache jinja2 \
&& pip install --no-cache nibabel \
&& pip install --no-cache nistats
COPY manifest.json ${FLYWHEEL}/manifest.json
COPY run.sh /flywheel/v0/run.sh
COPY . /flywheel/v0/
RUN chmod +x ${FLYWHEEL}/*
# RUN apt-get update -y
# RUN apt-get upgrade -y
# RUN apt-get install -y unzip
# RUN conda install matplotlib
# RUN conda install scikit-learn
# RUN apt-get install -y libcairo2-dev
# RUN apt-get install -y pango-1.0
# ENV preservation for Flywheel Engine
RUN env -u HOSTNAME -u PWD | \
awk -F = '{ print "export " $1 "=\"" $2 "\"" }' > ${FLYWHEEL}/docker-env.sh
WORKDIR /flywheel/v0