-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.server
More file actions
26 lines (17 loc) · 1.04 KB
/
Copy pathDockerfile.server
File metadata and controls
26 lines (17 loc) · 1.04 KB
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
# syntax=docker/dockerfile:1.7
ARG BUNNYLAND_SERVER_IMAGE=ghcr.io/thalismind/bunnyland-server@sha256:a4d1cc4d773c7978de4a3af455bda52dd42f095c145190337b266be2cc8729c9
FROM ${BUNNYLAND_SERVER_IMAGE} AS plugin
WORKDIR /plugin/bunnyland-3d
COPY server/pyproject.toml server/README.md ./
COPY server/src ./src
RUN --mount=type=cache,id=uv-cache,target=/root/.cache/uv,sharing=locked \
uv pip install --python /app/.venv/bin/python --no-deps "trimesh==4.12.2" && \
uv build --wheel --out-dir /tmp/bunnyland-3d-dist . && \
uv pip install --python /app/.venv/bin/python --no-deps /tmp/bunnyland-3d-dist/*.whl
FROM plugin AS test
COPY server/tests ./tests
RUN mkdir -p /reports
ENTRYPOINT ["uv"]
CMD ["run", "--project", "/app", "--with", "pytest", "-m", "pytest", "/plugin/bunnyland-3d/tests", "--junitxml=/reports/server.xml"]
FROM plugin AS runtime
CMD ["serve", "--module", "bunnyland_3d", "--generator", "lifesim-demo", "--ticks", "0", "--api-host", "0.0.0.0", "--api-port", "8765", "--save", "/data/worlds/main.json", "--autosave-every", "20"]