-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile_modelhub
40 lines (30 loc) · 1017 Bytes
/
Dockerfile_modelhub
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
# Use your environment image as base image
FROM XXXXXXXX
RUN apt-get update && apt-get install -y libmagic1
# Install requirements
RUN pip install Flask==1.1.2 \
flask-cors==3.0.6 \
Redis==2.10.6 \
Pillow==5.1.0 \
SimpleITK==1.1.0 \
jupyter==1.0.0 \
requests==2.20.0 \
python-magic==0.4.15 \
h5py==2.8.0
# Make ports available to the world outside this container
EXPOSE 80 8080
# Define environment variable
ENV PYTHONPATH /usr/local:/framework/:/contrib_src/:$PYTHONPATH
# Set the working directory to /framework
WORKDIR /framework
# Copy the framework directory contents into the container at /framework
ADD /framework /framework
# Create dir where working files go (e.g. from the webservice)
WORKDIR /working
# Create dir where output files go (e.g. from the webservice)
WORKDIR /output
# Switch to the dir that holds the usr sources
WORKDIR /contrib_src
# Run /data/run.py when the container launches
# If you need Python2, change this command:
CMD ["python3", "run.py"]