forked from bids-apps/QAP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
66 lines (52 loc) · 2.54 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
FROM ubuntu:trusty
MAINTAINER John Pellman <[email protected]>
# ENV http_proxy 'http://proxy.tch.harvard.edu:3128'
# ENV https_proxy 'http://proxy.tch.harvard.edu:3128'
ENV AFNIPATH /opt/afni/bin/
ENV PATH /code:/opt/afni/bin:/usr/local/bin/miniconda/bin:${PATH}
# install dependencies
RUN apt-get update
RUN apt-get install -y wget
RUN apt-get install -y 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
# install afni
RUN wget 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 the validator
RUN apt-get update && \
apt-get install -y curl && \
curl -sL https://deb.nodesource.com/setup_4.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
# install miniconda
RUN wget 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 lockfile ipython
# RUN pip install nipype==0.12.1 nibabel nitime pyyaml pandas seaborn pyPdf2 html5lib==1.0b8 xhtml2pdf==0.1b2 indi-tools ConfigParser argparse wsgiref
#install latest version of qap
# RUN cd /tmp/ && \
# git clone https://github.com/preprocessed-connectomes-project/quality-assessment-protocol.git && \
# cd quality-assessment-protocol && python setup.py build && python setup.py install
RUN pip install qap
# 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
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"]