forked from AirHockeyChallenge/air_hockey_challenge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (35 loc) · 1.23 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
FROM nvidia/cuda:11.6.2-base-ubuntu20.04 as base
RUN apt-get update && apt-get install -y python3-pip python-is-python3 git
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
FROM base as pip-build
WORKDIR /wheels
RUN apt-get update && apt-get -y install git
COPY requirements.txt .
RUN pip install -U pip \
&& pip wheel -r requirements.txt
FROM base as eval
COPY --from=pip-build /wheels /wheels
WORKDIR /src
ENV TZ=Europe/Berlin
ENV PYTHONPATH=/src/2023-challenge
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install ffmpeg libsm6 libxext6 git && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/*
RUN pip install -U pip \
&& pip install --no-cache-dir \
--no-index \
-r /wheels/requirements.txt \
-f /wheels \
&& rm -rf /wheels
COPY . 2023-challenge/
CMD ["python", "2023-challenge/run.py"]
FROM eval as dev
# For nvidia GPU
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
# libgl1-mesa-glx libgl1-mesa-dri for non-nvidia GPU
RUN apt-get update && apt-get -y install xauth tzdata libgl1-mesa-glx libgl1-mesa-dri && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/*