forked from mediatechnologycenter/AvatarForge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (21 loc) · 898 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
FROM continuumio/miniconda3 as base
ENV DEBIAN_FRONTEND noninteractive
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE 1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED 1
ENV TZ=Europe/Zurich
SHELL ["/bin/bash", "-c"]
WORKDIR /app
# Update & install packages
RUN apt-get -qq update --fix-missing && \
apt-get -qq install -y bash curl wget git ca-certificates openssh-client gpg tzdata && \
apt-get -qq clean
# Make sure google-cloud-sdk-gke-gcloud-auth-plugin is installed, because it won't be included in later releases
FROM base as backend
WORKDIR /app
COPY gunicorn.conf.py .
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY avatar_backend_api ./avatar_backend_api
CMD [ "gunicorn", "-c", "gunicorn.conf.py", "--chdir", "./avatar_backend_api", "-k", "uvicorn.workers.UvicornWorker", "app:app" ]