-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
35 lines (22 loc) · 893 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
FROM continuumio/miniconda3:latest AS base
LABEL maintainer=Unnati
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /audio-annonation
COPY environment.yml .
RUN conda env create -n comedy-project-docker -f environment.yml && \
conda clean -afy
SHELL ["conda", "run", "-n", "comedy-project-docker", "/bin/bash", "-c"]
RUN apt-get update && apt-get install -y \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# Entrypoint stage (for ensuring db exists)
COPY db-entrypoint.sh ./db-entrypoint.sh
COPY web-entrypoint.sh ./web-entrypoint.sh
RUN chmod +x ./db-entrypoint.sh ./web-entrypoint.sh
ENTRYPOINT ["./web-entrypoint.sh"]
# Application stage:
FROM base AS app
COPY . .
ENV PATH=/root/.local/bin:$PATH
CMD ["conda", "run", "--no-capture-output", "-n", "comedy-project-docker", "gunicorn", "--bind", "0.0.0.0:8000", "audio-annonation.wsgi:application"]