-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (23 loc) · 792 Bytes
/
Dockerfile
File metadata and controls
37 lines (23 loc) · 792 Bytes
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
ARG BASE_IMAGE=python:3.10-slim
FROM ${BASE_IMAGE} AS base
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN pip install --upgrade pip
ENV VIRTUAL_ENV=/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN apt-get update && apt-get install -y git g++ python3-dev
WORKDIR /code
COPY requirements.txt /code/BattlePyEngine/
WORKDIR /code/BattlePyEngine
RUN $VIRTUAL_ENV/bin/pip install --upgrade pip && \
$VIRTUAL_ENV/bin/pip install -r requirements.txt
FROM base AS prod
COPY . /code/BattlePyEngine
RUN $VIRTUAL_ENV/bin/pip install -e .
CMD ["/bin/bash"]
FROM base AS dev
COPY dev_requirements.txt /code/BattlePyEngine/
RUN $VIRTUAL_ENV/bin/pip install -r dev_requirements.txt
COPY . /code/BattlePyEngine
RUN $VIRTUAL_ENV/bin/pip install -e .