-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
35 lines (25 loc) · 880 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
27
28
29
30
31
32
33
34
35
# This is my own base image from the Docker Hub
# See https://github.com/jgbustos/ml-model-base-docker
FROM jgbustos/ml-model-base:latest
# Parent image to run under Nginx+uWSGI
# Python 3.10 on Debian
# FROM tiangolo/uwsgi-nginx-flask:python3.10
# Parent image to run under Meinheld+Gunicorn
# Python 3.9 on Debian
# FROM tiangolo/meinheld-gunicorn-flask:python3.9
LABEL maintainer="[email protected]"
COPY requirements.txt /app/
RUN pip install --upgrade pip \
&& pip install -r /app/requirements.txt
COPY . /app
WORKDIR /app
# Uncomment to set listen port for Nginx+uWSGI
# ENV LISTEN_PORT 8888
# Uncomment to set listen port for Meinheld+Gunicorn
# ENV PORT 8888
# ENV BIND 0.0.0.0:8888
EXPOSE 8888
ENV PYTHONPATH "${PYTHONPATH}:/app/ml_rest_api"
# Comment the two lines below to run under Nginx+uWSGI
ENTRYPOINT ["python3"]
CMD ["ml_rest_api/app.py"]