-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (36 loc) · 1.31 KB
/
Dockerfile
File metadata and controls
46 lines (36 loc) · 1.31 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
##
## Build the Rust compute-node binary (splatter-bin)
##
ARG SPLATTER_VERSION=0.0.0-local
FROM --platform=$BUILDPLATFORM rust:1.89-bullseye AS rust-build
ARG SPLATTER_VERSION
ENV SPLATTER_VERSION="${SPLATTER_VERSION}"
WORKDIR /app
COPY server/rust/ server/rust/
RUN cargo build --release -p splatter-bin --manifest-path server/rust/Cargo.toml
##
## Runtime image with nerfstudio + splatter runner
##
FROM ghcr.io/nerfstudio-project/nerfstudio:latest
ARG SPLATTER_VERSION
ENV SPLATTER_SERVER_VERSION="${SPLATTER_VERSION}"
ARG USERNAME=splatter-server
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ARG DEBIAN_FRONTEND=noninteractive
ENV TASKS_ROOT=/app/tasks
# Keep the original Python dependency footprint
RUN python3 -m pip install --no-cache-dir ply2splat
WORKDIR /app
# Job pipeline scripts (run.py drives ns-process-data / ns-train)
COPY run.py extract_mp4.py convert_ply2splat.py rotate_ply.py /app/
# Compute node binary built from source
COPY --from=rust-build /app/server/rust/target/release/splatter-bin /app/compute-node
# Non-root user and writable workspace for task payloads
RUN groupadd --gid "$USER_GID" "$USERNAME" \
&& useradd --uid "$USER_UID" --gid "$USER_GID" -m "$USERNAME" \
&& mkdir -p /app/tasks \
&& chown -R "$USERNAME:$USERNAME" /app
USER $USERNAME
EXPOSE 8080
ENTRYPOINT ["/app/compute-node"]