forked from scitran-apps/dcm-convert
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
51 lines (41 loc) · 1.52 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
# stanfordcni/cni-dcm-convert
#
# Use SciTran Data lib to convert raw DICOM data (zip) from Siemens or GE to
# various formats (montage, nifti, png).
# See http://github.com/vistalab/scitran-data for source code.
#
FROM ubuntu-debootstrap:trusty
MAINTAINER Michael Perry <lmperry@stanford.edu>
# Install dependencies
RUN apt-get update && apt-get -y install python-dev \
python-virtualenv \
git \
libjpeg-dev \
zlib1g-dev \
curl \
bsdtar
# Link libs: pillow jpegi and zlib support hack
RUN ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
RUN ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
# Install scitran.data dependencies
RUN pip install \
numpy==1.9.0 \
pytz==2017.2 \
pillow==4.2.1 \
git+https://github.com/vistalab/pydicom.git@0.9.9_value_vr_mismatch \
git+https://github.com/nipy/nibabel.git@3bc31e9a6191fc54667b3387ed5dfaced46bf755 \
git+https://github.com/moloney/dcmstack.git@6d49fe01235c08ae63c76fa2f3943b49c9b9832d
RUN pip install git+https://github.com/vistalab/scitran-data.git@0ebebcb2f91c9292eb7249425dcaedce50f23804
# Install tagged version of dcm2niix
ENV TAG=v1.0.20201102
RUN curl -#L https://github.com/rordenlab/dcm2niix/releases/download/$TAG/dcm2niix_lnx.zip \
| bsdtar -xf- -C /usr/bin && chmod +x /usr/bin/dcm2nii*
# Make directory for flywheel spec (v0)
ENV FLYWHEEL /flywheel/v0
RUN mkdir -p ${FLYWHEEL}
# Put the code in place
COPY manifest.json ${FLYWHEEL}/
COPY run ${FLYWHEEL}/run
RUN chmod +x ${FLYWHEEL}/run
# Set the entrypoint
ENTRYPOINT ["/flywheel/v0/run"]