-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
61 lines (47 loc) · 1.84 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
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
LABEL vendor="Computational Radiology Laboratory"
LABEL vendor="crl.med.harvard.edu"
# Update the ubuntu.
RUN apt-get -y update && \
apt-get -y upgrade
# FIX THE MISSING LOCALE in ubuntu
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y locales \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LC_TYPE=en_US.UTF-8
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y wget \
curl vim nano zip
# install CRKIT
RUN mkdir /opt/crkit && \
cd /opt/crkit && \
wget http://crl.med.harvard.edu/CRKIT/CRKIT-1.6.0-RHEL6.tar.gz && \
tar -xf CRKIT-1.6.0-RHEL6.tar.gz && \
rm CRKIT-1.6.0-RHEL6.tar.gz
RUN apt-get install -y software-properties-common
COPY requirements.txt /tmp/requirements.txt
RUN apt-get install -y python3-pip
RUN pip3 install -r /tmp/requirements.txt
# add env variables
ENV BUNDLE /opt/crkit/crkit-1.6.0
ENV PATH $PATH:$BUNDLE/bin
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:$BUNDLE/itk-4.6.1/lib
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:$BUNDLE/Frameworks/InsightToolkit:$BUNDLE/Frameworks/vtk-6.1:$BUNDLE/Frameworks/qt-5.3.2/lib:$BUNDLE/lib:$BUNDLE/bin
ENV QT_PLUGIN_PATH $BUNDLE/Frameworks/qt-5.3.2/plugins
ENV DYLD_LIBRARY_PATH ""
# install GGR-recon
RUN mkdir -p /opt/GGR-recon
COPY utils.py /opt/GGR-recon
COPY preprocess.py /opt/GGR-recon
COPY recon.py /opt/GGR-recon
ENV PATH ${PATH}:/opt/GGR-recon
RUN chmod a+rx /opt/GGR-recon/preprocess.py
RUN chmod a+rx /opt/GGR-recon/recon.py
WORKDIR /opt/GGR-recon
# DEFAULT CMD provides a list of programs.
ENV msg="\nRun one of these programs:\n"
CMD echo $msg; find /opt/GGR-recon/ -type f -name "*.py"; echo $msg