-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
26 lines (21 loc) · 943 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
24
25
26
# Based on the example at https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-python-service
# Getting base image
FROM python:3.10-slim
# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
# Adding the necessary files, like app.py, to the image
ENV APP_HOME /app
WORKDIR ${APP_HOME}
ADD . $APP_HOME
# Installing the necessary packages
RUN pip install --no-cache-dir werkzeug==2.2.2
RUN pip install --no-cache-dir flask==2.1.0
RUN pip install --no-cache-dir pandas==1.4.2
RUN pip install --no-cache-dir scipy==1.8.0
RUN pip install --no-cache-dir matplotlib==3.5.2
RUN pip install --no-cache-dir statsmodels==0.13.2
RUN pip install --no-cache-dir scikit-learn==1.0.2
RUN pip install --no-cache-dir gunicorn==20.1.0
RUN pip install --no-cache-dir pymongo[srv]==4.1.1
# Running the website
CMD exec gunicorn --bind 0.0.0.0:8000 --workers 1 --threads 4 --timeout 0 app:app