-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
99 lines (86 loc) · 3.07 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
FROM ubuntu:jammy
# LABEL John Pellman <[email protected]>
ARG DEBIAN_FRONTEND="noninteractive"
ENV AFNIPATH /opt/afni/bin/
ENV PATH /code:/opt/afni/bin:/usr/local/bin/miniconda/bin:${PATH}
# install dependencies
RUN apt-get update -qq && \
apt-get install -q --no-install-recommends -y \
wget \
pkg-config \
graphviz \
gsl-bin \
libexpat1-dev \
libgiftiio-dev \
libglu1-mesa \
libglu1-mesa-dev \
libgsl0-dev \
libjpeg-progs \
libxml2 \
libxml2-dev \
libxext-dev \
libxpm-dev \
libxp6 \
libxp-dev \
mesa-common-dev \
mesa-utils \
netpbm \
libpng-dev \
libfreetype6-dev \
libxml2-dev \
libxslt1-dev \
python-dev \
build-essential \
g++ \
libxft2 \
git && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# install miniconda
RUN wget --progress=dot:giga http://repo.continuum.io/miniconda/Miniconda-3.8.3-Linux-x86_64.sh && \
bash Miniconda-3.8.3-Linux-x86_64.sh -b -p /usr/local/bin/miniconda && \
rm -rf Miniconda-3.8.3-Linux-x86_64.sh && python -v
# install python requirements
RUN conda install -y pip scipy && \
pip install --upgrade pip && \
pip install \
nipype \
nibabel \
nitime \
pyyaml \
pandas \
seaborn \
html5lib==1.0b8 \
pyPdf2 \
xhtml2pdf \
indi-tools
# the first time nipype runs it will create a configuration directory, do it here
# to avoid problems in the future
RUN /usr/local/bin/miniconda/bin/python -c "import nipype" 2> /dev/null
# install afni
RUN wget --progress=dot:giga http://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz && \
tar xzvf linux_openmp_64.tgz && mkdir -p /opt/afni && \
mv linux_openmp_64/ /opt/afni/bin && \
rm -rf linux_openmp_64.tgz
#install latest version of qap
RUN cd /tmp/ && \
git clone -b 1.0.8 https://github.com/preprocessed-connectomes-project/quality-assessment-protocol.git && \
cd quality-assessment-protocol && \
python setup.py build && \
python setup.py install
## Install the validator
RUN apt-get update -qq && \
apt-get install -q --no-install-recommends -y curl && \
curl -sL https://deb.nodesource.com/setup_4.x | bash - && \
apt-get remove -y curl && \
apt-get install -y --no-install-recommends nodejs && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN npm install -g bids-validator
RUN mkdir /scratch && mkdir /local-scratch && mkdir -p /code && mkdir -p /qap_resources
COPY qap_templates.tar.gz /qap_resources/qap_templates.tar.gz
COPY default_pipeline.yml /qap_resources/default_pipeline.yml
COPY run.py /code/run.py
COPY bids_utils.py /code/bids_utils.py
RUN chmod +x /code/run.py && cd /qap_resources \
&& tar xzvf /qap_resources/qap_templates.tar.gz \
&& rm -f /qap_resources/qap_templates.tar.gz
ENTRYPOINT ["/code/run.py"]