-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.server
48 lines (38 loc) · 1.16 KB
/
Dockerfile.server
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
FROM nvcr.io/nvidia/pytorch:24.10-py3
WORKDIR /app
# Install system dependencies and clean up in one layer
RUN apt-get update && apt-get install -y \
xvfb \
python3-pygame \
python3.10-venv \
git \
curl \
build-essential \
cmake \
zlib1g-dev \
libsdl2-dev \
libhdf5-dev \
# for lucid-v1
wget \
libgl1 \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Install poetry using the official installer
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VERSION=1.8.4
RUN curl -sSL https://install.python-poetry.org | python3 - && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false && \
poetry config installer.parallel false # installing from two branches on same repo fails otherwise
# Copy and install main dependencies
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-interaction --no-ansi --no-root --no-directory
# Copy the rest of the application code
COPY . .
# Install root
RUN poetry install --no-interaction --no-ansi
EXPOSE 8080
# Start Xvfb and run the server
CMD Xvfb :99 -screen 0 1024x768x16 & \
DISPLAY=:99 poetry run python dweam/scripts/serve.py