forked from muscbridge/PyDesigner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
106 lines (93 loc) · 3.03 KB
/
Dockerfile
File metadata and controls
106 lines (93 loc) · 3.03 KB
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
# ==============================================================================
# NeuroDock
# A docker container that contains all PyDesigner dependencies such as MRTRIX3,
# FSL, and Python to preprocess diffusion MRI images.
#
# Maintainer: Siddhartha Dhiman
# ------------------------------------------------------------------------------
# Current Dependencies
# 1.) FSL
# 2.) MRTRIX3
# 3.) Python 2.7
# 4.) Python 3.6
# 6.) PyDesigner
# ==============================================================================
# Load base Ubuntu image
FROM debian:buster-slim
# Add LABEL Information
# ARG BUILD_DATE
# ARG VCS_REF
# Labels.
LABEL maintainer="Siddhartha Dhiman (dhiman@musc.edu)"
LABEL org.label-schema.schema-version="1.0.0-rc1"
LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.name="dmri/pydesigner"
LABEL org.label-schema.description="A state-of-the-art difusion and kurtosis MRI processing pipeline"
LABEL org.label-schema.url="https://github.com/m-ama/"
LABEL org.label-schema.vcs-url="https://github.com/m-ama/NeuroDock.git"
LABEL org.label-schema.vcs-ref=$VCS_REF
LABEL org.label-schema.vendor="MAMA"
ARG DEBIAN_FRONTEND=noninteractive
# Initial update
RUN apt-get update && \
apt-get install -y \
apt-utils \
wget \
curl \
nano \
software-properties-common \
python2.7 python-pip \
python3-pip \
jq \
libblas-dev \
liblapack-dev \
libatlas-base-dev \
gfortran
# Install MRTRIX3 dependencies
RUN apt-get install -y --no-install-recommends \
clang \
git \
libeigen3-dev \
zlib1g-dev \
libqt4-opengl-dev \
libgl1-mesa-dev \
libfftw3-dev \
libtiff5-dev \
libomp-dev
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Copy and install PyDesigner
RUN mkdir -p /tmp/PyDesigner
ADD . / /tmp/PyDesigner/
RUN pip3 install /tmp/PyDesigner
RUN echo "alias python=python3" >> ~/.bashrc && source ~/.bashrc
RUN echo "alias pip=pip3" >> ~/.bashrc && source ~/.bashrc
# Install Python dependencies
RUN pip3 install --upgrade setuptools && \
pip3 install numpy \
pandas \
scipy \
joblib \
multiprocess \
tqdm \
nibabel \
cvxpy
# Install FSL
RUN curl https://fsl.fmrib.ox.ac.uk/fsldownloads/fslinstaller.py -o /tmp/fslinstaller.py
RUN echo "/usr/local/fsl" | python2 /tmp/fslinstaller.py -V 6.0.3
# Configure FSL Environment
ENV FSLDIR=/usr/local/fsl
ENV FSLOUTPUTTYPE=NIFTI_GZ
ENV PATH=$PATH:$FSLDIR/bin
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FSLDIR
# Build and Configure MRTRIX3
RUN git clone https://github.com/MRtrix3/mrtrix3.git /usr/lib/mrtrix3
ENV CXX=/usr/bin/clang++
ENV ARCH=native
RUN cd /usr/lib/mrtrix3 && \
./configure -nogui -openmp && \
./build && \
./set_path
ENV PATH=$PATH:/usr/lib/mrtrix3/bin
# Remove unwanted packages
RUN apt-get autoremove && apt-get clean
RUN rm /tmp/fslinstaller.py && rm -r /tmp/PyDesigner