-
Notifications
You must be signed in to change notification settings - Fork 49
/
Dockerfile
38 lines (28 loc) · 901 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
FROM python:3.12.3-slim
LABEL org.opencontainers.image.source https://github.com/talkdai/dialog
LABEL org.opencontainers.image.licenses MIT
RUN useradd --user-group --system --create-home --no-log-init talkd
RUN export PATH="/home/talkd/.local/bin:$PATH"
ENV PIP_DEFAULT_TIMEOUT=100
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
ENV PIP_NO_CACHE_DIR=on
ENV PYTHONFAULTHANDLER=1
ENV PYTHONHASHSEED=random
ENV PYTHONUNBUFFERED=1
RUN apt update -y && \
apt install -y gcc libpq-dev && \
apt-get autoremove -y && \
apt-get clean -y
RUN pip install poetry
WORKDIR /app
COPY poetry.lock pyproject.toml README.md /app/
COPY pytest.ini /app/src/
RUN poetry config virtualenvs.create false && \
poetry install --only main
COPY /static /app/static
COPY /etc /app/etc
COPY /src /app/src
RUN chmod +x /app/etc/run.sh
RUN chmod +x /app/etc/run-tests.sh
WORKDIR /app/src
CMD [ "/app/etc/run.sh" ]