forked from scitran-apps/dicom-mr-classifier
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
52 lines (43 loc) · 1.24 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
# scitran/dicom-mr-classifier
#
# Use pyDicom to classify raw DICOM data (zip) from Siemens, GE or Philips.
#
# Example usage:
# docker run --rm -ti \
# -v /path/to/dicom/data:/data \
# scitran/dicom-mr-classifier \
# /data/input.zip \
# /data/outprefix
#
FROM ubuntu:trusty
MAINTAINER Michael Perry <[email protected]>
# Install dependencies
RUN apt-get update && apt-get -y install \
python \
python-dev \
python-pip \
jq \
wget
# Install scitran.data dependencies
RUN pip install \
pydicom==0.9.9 \
python-dateutil==2.6.0 \
pytz==2017.2 \
tzlocal==1.4 \
nibabel==2.2.1
# Make directory for flywheel spec (v0)
ENV FLYWHEEL /flywheel/v0
WORKDIR ${FLYWHEEL}
COPY run \
run_classifier \
manifest.json \
${FLYWHEEL}/
# Create Flywheel User
RUN adduser --disabled-password --gecos "Flywheel User" flywheel
# Add code to determine classification from dicom descrip (label)
COPY classification_from_label.py ${FLYWHEEL}/classification_from_label.py
RUN chmod +x ${FLYWHEEL}/run* && chown flywheel ${FLYWHEEL}/classification_from_label.py
# Copy classifier code into place
COPY dicom-mr-classifier.py ${FLYWHEEL}/dicom-mr-classifier.py
# Set the entrypoint
ENTRYPOINT ["/flywheel/v0/run"]