forked from randovania/randovania
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.server
More file actions
30 lines (21 loc) · 885 Bytes
/
Dockerfile.server
File metadata and controls
30 lines (21 loc) · 885 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
FROM python:3.12
WORKDIR /usr/src/app
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
ENV UV_LINK_MODE=copy
RUN apt-get update && apt-get install -y \
graphviz \
&& rm -rf /var/lib/apt/lists/*
# Install dependencies
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --locked --no-install-project --extra server --extra exporters
# Copy the project into the image
COPY . .
RUN touch randovania/enable-cython
# Sync the project and create pyc for faster startup
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --extra server --extra exporters --compile-bytecode
VOLUME ["/data"]
ENTRYPOINT ["/usr/src/app/.venv/bin/python", "-m", "randovania"]
CMD ["--configuration", "/data/configuration.json", "server", "run"]