-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.serving
27 lines (20 loc) · 1003 Bytes
/
Dockerfile.serving
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
# https://docs.docker.com/engine/reference/builder/#from
# You shouldn't need to change this
FROM python:3.7
# Install codebase and default model
ADD serving/ /code/
# Create and cd into /code as your working directory
WORKDIR /code
# TODO: install libs
RUN pip install -r requirements.txt
# TODO: expose ports (or do this in docker-compose)
# ENV SERVING_PORT=5000
# EXPOSE ${SERVING_PORT}
ENV SERVING_PORT=5000
EXPOSE ${SERVING_PORT}
# TODO: specify default command - this is not required because you can always specify the command
# either with the docker run command or in the docker-compose file
CMD gunicorn --bind 0.0.0.0:${SERVING_PORT} app:app --timeout 600
# To build file use: docker build -t ift6758/serving:1.0.0 . -f Dockerfile.serving
# To run the image use: docker run -d -p 5000:5000 --env COMET_API_KEY="uSCsJDHCChylrC6vWAR235rC5" -it ift6758/serving:1.0.0
# To run the image use: docker run -p 5000:5000 --env COMET_API_KEY="uSCsJDHCChylrC6vWAR235rC5" -it ift6758/serving:1.0.0