-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
106 lines (95 loc) · 3.88 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
# Generated by Neurodocker v0.3.1-13-ga8bb71e.
#
# 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/kaczmarj/neurodocker
#
# Timestamp: 2017-11-27 21:13:04
FROM ubuntu:17.10
ARG DEBIAN_FRONTEND=noninteractive
#----------------------------------------------------------
# Install common dependencies and create default entrypoint
#----------------------------------------------------------
ENV LANG="en_US.UTF-8" \
LC_ALL="C.UTF-8" \
ND_ENTRYPOINT="/neurodocker/startup.sh" \
AFNI_NIFTI_VIEW="orig"
RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
apt-utils bzip2 ca-certificates curl locales unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& localedef --force --inputfile=en_US --charmap=UTF-8 C.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 +x' >> $ND_ENTRYPOINT \
&& echo 'if [ -z "$*" ]; then /usr/bin/env bash; else $*; fi' >> $ND_ENTRYPOINT; \
fi \
&& chmod -R 777 /neurodocker && chmod a+s /neurodocker
#--------------------
# Install AFNI latest
#--------------------
ENV PATH=/opt/afni:$PATH
RUN apt-get update -qq && apt-get install -yq --no-install-recommends ed gsl-bin libglu1-mesa-dev libglib2.0-0 libglw1-mesa \
libgomp1 libjpeg62 libxm4 netpbm tcsh xfonts-base xvfb python python3 python3-pip python3-setuptools python3-tk\
&& libs_path=/usr/lib/x86_64-linux-gnu \
&& if [ -f $libs_path/libgsl.so.19 ]; then \
ln $libs_path/libgsl.so.19 $libs_path/libgsl.so.0; \
fi \
&& echo "Install libxp (not in all ubuntu/debian repositories)" \
&& apt-get install -yq --no-install-recommends libxp6 \
|| /bin/bash -c " \
curl --retry 5 -o /tmp/libxp6.deb -sSL http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
&& dpkg -i /tmp/libxp6.deb && rm -f /tmp/libxp6.deb" \
&& echo "Install libpng12 (not in all ubuntu/debian repositories" \
&& apt-get install -yq --no-install-recommends libpng12-0 \
|| /bin/bash -c " \
curl -o /tmp/libpng12.deb -sSL http://mirrors.kernel.org/debian/pool/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb \
&& dpkg -i /tmp/libpng12.deb && rm -f /tmp/libpng12.deb" \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& echo "Downloading AFNI ..." \
&& mkdir -p /opt/afni \
&& curl -sSL --retry 5 https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \
| tar zx -C /opt/afni --strip-components=1 \
&& pip3 install jinja2 pandas matplotlib
#-----------------------
# Install bids validator
#-----------------------
RUN apt-get update && \
apt-get install -y curl && \
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get remove -y curl && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN npm install -g bids-validator@0.24.0
COPY run.py /run.py
COPY . /code
RUN mkdir /work
COPY version /version
ENTRYPOINT ["/run.py"]
#--------------------------------------
# Save container specifications to JSON
#--------------------------------------
RUN echo '{ \
\n "pkg_manager": "apt", \
\n "check_urls": true, \
\n "instructions": [ \
\n [ \
\n "base", \
\n "ubuntu:17.04" \
\n ], \
\n [ \
\n "afni", \
\n { \
\n "version": "latest", \
\n "install_python2": "True", \
\n "install_python3": "True" \
\n } \
\n ] \
\n ], \
\n "generation_timestamp": "2017-11-27 21:13:04", \
\n "neurodocker_version": "0.3.1-13-ga8bb71e" \
\n}' > /neurodocker/neurodocker_specs.json