-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·94 lines (81 loc) · 3.17 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
############################
# Get Freesurfer version in fMRIPrep 20.0.5
FROM ubuntu:xenial-20200114
MAINTAINER Ellyn Butler <[email protected]>
ENV FREESURFER_VERSION 6.0.1
ENV FREESURFER_HOME /opt/freesurfer
############################
# Install basic dependencies
RUN apt-get update && apt-get -y install \
jq \
tar \
zip \
build-essential
#COPY docker/files/neurodebian.gpg /usr/local/etc/neurodebian.gpg
# Prepare environment
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python2.7 \
curl \
bzip2 \
ca-certificates \
xvfb \
build-essential \
autoconf \
libtool \
pkg-config \
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/*
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 freesurfer
RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.1/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1.tar.gz | tar zxv --no-same-owner -C /opt \
--exclude='freesurfer/diffusion' \
--exclude='freesurfer/docs' \
--exclude='freesurfer/fsfast' \
--exclude='freesurfer/lib/cuda' \
--exclude='freesurfer/lib/qt' \
--exclude='freesurfer/matlab' \
--exclude='freesurfer/mni/share/man' \
--exclude='freesurfer/subjects/fsaverage_sym' \
--exclude='freesurfer/subjects/fsaverage3' \
--exclude='freesurfer/subjects/fsaverage4' \
--exclude='freesurfer/subjects/cvs_avg35' \
--exclude='freesurfer/subjects/cvs_avg35_inMNI152' \
--exclude='freesurfer/subjects/bert' \
--exclude='freesurfer/subjects/lh.EC_average' \
--exclude='freesurfer/subjects/rh.EC_average' \
--exclude='freesurfer/subjects/sample-*.mgz' \
--exclude='freesurfer/subjects/V1_average' \
--exclude='freesurfer/trctrain'
# Installing precomputed python packages # September 3, 2020: Ending up with pip v 10.1.1
RUN conda install -y python=3.7.1 \
pip=19.1 \
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 pandas==1.1.3
############################
RUN mkdir -p /scripts
COPY stats2table_bash.sh /scripts/stats2table_bash.sh
COPY idcols.py /scripts/idcols.py
COPY run.sh /scripts/run.sh
RUN chmod +x /scripts/run.sh
RUN mkdir -p /output
RUN mkdir -p /input
RUN mkdir -p /input/data
RUN mkdir -p /input/license
RUN chmod +x /input
#RUN chmod +x ${FREESURFER_HOME} # Hopefully this will allow me to copy over the license... nope
#RUN chmod -R 777 ${FREESURFER_HOME} # Didn't work out
WORKDIR /home
ENTRYPOINT ["/scripts/run.sh"]