-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
40 lines (36 loc) · 1.37 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/cnn-smoothie' \
vendor='Englander Institute for Precision Medicine' \
description='CNN Smoothie' \
maintainer='[email protected]' \
base_image='python' \
base_image_version='3.7.9-buster'
ENV APP_NAME='cnn_smoothie' \
TZ='US/Eastern' \
CNN_SMOOTHIE_SRC_DIR='/cnn_smoothie/src/cnn_smoothie_src' \
PREDICT_DIR='/cnn_smoothie/src/cnn_smoothie_src/slim'
ENV RESULT_DIR=${CNN_SMOOTHIE}/result \
PROCESS_DIR=${CNN_SMOOTHIE}/process \
PYTHONPATH=${PYTHONPATH}:${CNN_SMOOTHIE}:${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