-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
37 lines (26 loc) · 908 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
FROM python:3.11-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
USER dialog
WORKDIR /app
COPY poetry.lock pyproject.toml README.md /app/
COPY pytest.ini /app/dialog_lib/
USER root
RUN apt update -y && apt upgrade -y && apt install gcc libpq-dev postgresql-client -y
RUN pip install -U pip poetry
COPY /etc /app/etc
COPY /dialog_lib /app/dialog_lib
RUN poetry config virtualenvs.create false && \
poetry install
USER root
RUN apt update && apt -y upgrade && apt -y install libpq-dev
RUN chmod +x /app/etc/run-tests.sh
WORKDIR /app/dialog_lib