-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
40 lines (36 loc) · 1.3 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
FROM python:3.7.9-buster
#===============================#
# Docker Image Configuration #
#===============================#
LABEL org.opencontainers.image.source='https://github.com/eipm/stork' \
vendor='Englander Institute for Precision Medicine' \
description='STORK' \
maintainer='als2076@med.cornell.edu' \
base_image='python' \
base_image_version='3.7.9-buster'
ENV APP_NAME='stork' \
TZ='US/Eastern' \
STORK_SRC_DIR='/stork/src/stork_src' \
PREDICT_DIR='/stork/src/stork_src/slim'
ENV RESULT_DIR=${STORK_SRC_DIR}/result \
PROCESS_DIR=${STORK_SRC_DIR}/process \
PYTHONPATH=${PYTHONPATH}:${STORK_SRC_DIR}:${PREDICT_DIR}
#===================================#
# Install Prerequisites #
#===================================#
COPY requirements.txt /${APP_NAME}/requirements.txt
RUN pip install -r /${APP_NAME}/requirements.txt
#===================================#
# Copy Files and set work directory #
#===================================#
COPY src /${APP_NAME}/src/
WORKDIR /${APP_NAME}
#===================================#
# Startup #
#===================================#
EXPOSE 80
VOLUME uploads
VOLUME output
HEALTHCHECK --interval=30s --timeout=30s --retries=3 \
CMD curl -f -k http://0.0.0.0/api/healthcheck || exit 1
CMD python3 /${APP_NAME}/src/main.py