forked from CCExtractor/Rekognition
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (31 loc) · 771 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
36
37
38
39
40
41
FROM python:3.6
# set work directory
WORKDIR /app
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV DEBUG 0
# install psycopg2
RUN apt-get update && apt-get install -y --no-install-recommends \
tzdata \
python3-setuptools \
python3-pip \
python3-dev \
python3-venv \
git \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# install dependencies
COPY ./requirements.txt .
RUN pip install -r requirements.txt
COPY ./download_model.sh .
RUN chmod +x download_model.sh
RUN ./download_model.sh
# copy project
COPY . .
# add and run as non-root user
# RUN adduser -D myuser
# USER myuser
# run gunicorn
CMD gunicorn Rekognition.wsgi:application --bind 0.0.0.0:$PORT