generated from rl-institut/rli_template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
40 lines (30 loc) · 947 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
FROM python:3.7.6-buster
MAINTAINER Pierre-Francois Duc <[email protected]>
ARG branch=master
ARG POSTGRES_url
ARG POSTGRES_user
ARG POSTGRES_pw
ARG POSTGRES_db
ENV POSTGRES_URL=$POSTGRES_url
ENV POSTGRES_USER=$POSTGRES_user
ENV POSTGRES_PW=$POSTGRES_pw
ENV POSTGRES_DB=$POSTGRES_db
COPY docker_postgres_login_help.py /
COPY app /app
COPY index.py /
#make python and pip working for numpy
#ADD repositories /etc/apk/repositories
RUN apt update
RUN apt-get -y install git
# options for gunicorn
ENV GUNICORN_CMD_ARGS=--bind=0.0.0.0:8000 --workers=2
# this helps using the cache of docker
RUN /usr/local/bin/python -m pip install --upgrade pip
COPY app/requirements.txt /
COPY app/setup_maps.py /
RUN pip install -r /requirements.txt
RUN pip install gunicorn
RUN git clone --single-branch --branch $branch https://github.com/rl-institut/NESP2.git
# Setup flask application
RUN mkdir -p /src
RUN python /setup_maps.py