-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
31 lines (24 loc) · 849 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
FROM tensorflow/tensorflow:1.13.1-py3
LABEL maintainer="Julien Plu <[email protected]>"
RUN apt update && \
apt install software-properties-common -y && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt update && \
apt install python3.7 python3.7-dev -y && \
apt clean && \
rm -rf /var/lib/apt/lists/* && \
rm /usr/local/bin/python && \
ln -s /usr/bin/python3.7 /usr/local/bin/python && \
pip freeze > requirements.txt && \
python3.7 -m pip install --no-cache-dir -U pip && \
pip install --no-cache-dir -U -r requirements.txt && \
rm requirements.txt && \
pip install --no-cache-dir -U uvicorn gunicorn fastapi
COPY ./gunicorn_conf.py /gunicorn_conf.py
COPY ./start.sh /start.sh
RUN chmod +x /start.sh
COPY ./app /app
WORKDIR /app/
ENV PYTHONPATH=/app
EXPOSE 80
CMD ["/start.sh"]