-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (16 loc) · 734 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
FROM python:3.11-slim
# Write .pyc files only once. See: https://stackoverflow.com/a/60797635/2556577
ENV PYTHONDONTWRITEBYTECODE 1
# Make sure that stdout and stderr are not buffered. See: https://stackoverflow.com/a/59812588/2556577
ENV PYTHONUNBUFFERED 1
# Remove assert statements and any code conditional on __debug__. See: https://docs.python.org/3/using/cmdline.html#cmdoption-O
ENV PYTHONOPTIMIZE 2
WORKDIR /user/app
COPY requirements.txt .
COPY requirements/base.txt ./requirements/
RUN python -m pip install --no-cache-dir -U pip && \
python -m pip install --no-cache-dir -U setuptools wheel
COPY . .
RUN python -m pip install -U --no-cache-dir -r requirements.txt
RUN python -m pip install -U -e .
CMD ["bash"]