forked from pkucmus/spacenav-ws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (25 loc) · 946 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
FROM python:3.9.1-slim
ENV POETRY_VIRTUALENVS_CREATE=false
ENV PYTHONBREAKPOINT=ipdb.set_trace
RUN apt update && apt install -y \
gettext \
libssl-dev \
libffi-dev \
make \
gcc \
git \
libc-dev \
musl-dev;
ENV POETRY_VERSION=1.4.2
RUN curl -sSL https://install.python-poetry.org/ | POETRY_HOME=/opt/poetry python && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry
RUN poetry config virtualenvs.create false
WORKDIR /app
COPY poetry.lock* pyproject.toml /app/
ARG INSTALL_DEV=false
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root --no-interaction --no-ansi; else poetry install --no-root --no-dev --no-interaction --no-ansi; fi"
COPY src/ /app/src
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-interaction --no-ansi; else poetry install --no-dev --no-interaction --no-ansi; fi"
# COPY pytest.ini mypy.ini .flake8 /app/
ENV PYTHONPATH=/app/src