-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
23 lines (16 loc) · 866 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# First install the python 3.8, the slim version uses less space
FROM python:3.8.12-slim
# Install pipenv library in Docker
RUN pip install pipenv
# create a directory in Docker named app and we're using it as work directory
WORKDIR /app
# Copy the Pip files into our working derectory
COPY ["Pipfile", "Pipfile.lock", "./"]
# install the pipenv dependencies for the project and deploy them.
RUN pipenv install --deploy --system
# Copy any python files and the model we had to the working directory of Docker
COPY ["*.py", "model_C=1.0.bin", "./"]
# We need to expose the 9696 port because we're not able to communicate with Docker outside it
EXPOSE 9696
# If we run the Docker image, we want our churn app to be running
ENTRYPOINT ["gunicorn", "--bind", "0.0.0.0:9696", "churn_serving:app"]