Skip to content

Code-first video & image, rendered natively on WebGPU.

fix(renderer-service): tini subreaper on RunPod; document RunPod results

okanasld683475f2fae
diff --git a/apps/renderer-service/Dockerfile b/apps/renderer-service/Dockerfile
index ee48a301..dcf53fd7 100644
--- a/apps/renderer-service/Dockerfile
+++ b/apps/renderer-service/Dockerfile
@@ -88,4 +88,6 @@ EXPOSE 8082
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
CMD node -e "fetch('http://127.0.0.1:'+(process.env.RENDERER_PORT||8082)+'/health').then(r=>process.exit(r.status===200?0:1),()=>process.exit(1))"
-ENTRYPOINT ["/usr/bin/tini", "-g", "--", "/app/docker/entrypoint.sh"]
+# -s: RunPod starts the container through its own init, so tini isn't PID 1;
+# registering as a subreaper keeps zombie reaping working there.
+ENTRYPOINT ["/usr/bin/tini", "-s", "-g", "--", "/app/docker/entrypoint.sh"]
diff --git a/apps/renderer-service/PLAN.md b/apps/renderer-service/PLAN.md
index 582f0fd6..e624733c 100644
--- a/apps/renderer-service/PLAN.md
+++ b/apps/renderer-service/PLAN.md
@@ -616,6 +616,13 @@ Each phase is its own PR-sized step with tests.
8. **Image + template + compose + docs.** Built and run locally (arm64, Docker on macOS, without a GPU):
- **Inside the container:** a file:// repo pinned to the published `[email protected]` went through checkout, then `npm ci` from the registry (40 s cold), then engine binding with GPU init on Mesa's software Vulkan, then a VP9 render, verification and delivery. The output was a valid 2 s VP9/Opus file.
- **Findings fixed on the way:** glibc 2.38 (moved to trixie); EPIPE from the `exec` helper writing stdin that git never reads; corepack's npm differing from the lockfile's npm; install errors keeping only npm's usage text.
+ - **RunPod (RTX 3070, Community Cloud, $0.13/h, driver 580.65), with the public smoke repo and the `:beta` image:**
+ - **Health:** `/health` reported the RTX 3070 with `FF_GPU=require`; the Vulkan ICD list was limited to `nvidia_icd.json` plus the Mesa GPU drivers. The 40 GB container disk was reported as 40 GB, so `statfs` is accurate there and no GB cap is needed.
+ - **threeD:** 21 s total (clone + LFS 1.7 s, cold `npm ci` 13.8 s, render 5 s); about 1.7 s for 120 frames on the GPU.
+ - **film:** 366 frames in 16 s, warm (install 2 ms).
+ - **vision:** 60 frames in 388 s. The ONNX models run on the CPU, and this includes their first download.
+ - **Encoding:** NVENC isn't usable on driver 580: node-av 6.1.1's FFmpeg needs NVENC API 13.1, i.e. driver ≥ 610. The encoder selection fell back to libx264 as designed.
+ - **tini:** RunPod doesn't start the container with tini as PID 1, so it now runs with `-s` (subreaper).
- **LFS end to end:**
- `src/git/lfs.test.ts` runs real git-lfs (3.8) against file:// origins. It covers a cold download into the shared store, a warm hit, objects shared across repos, include patterns with the `LFS_POINTERS_LEFT` warning, LFS off, and a missing object (`LFS_OBJECT_MISSING`).
- In the arm64 container (git-lfs 3.6.1), a repo whose framefields tarball and logo PNG are both LFS-tracked installed from the LFS tarball and rendered the logo (centre pixel red). The job reported `cache.lfs: "miss"`.
diff --git a/apps/renderer-service/README.md b/apps/renderer-service/README.md
index 08f23eb2..53b9a570 100644
--- a/apps/renderer-service/README.md
+++ b/apps/renderer-service/README.md
@@ -162,6 +162,8 @@ For NVIDIA GPUs in Docker, the NVIDIA Container Toolkit must mount the Vulkan dr
- NVENC on NVIDIA, VideoToolbox on macOS.
- Otherwise software: libx264 (H.264), libx265 (HEVC), libvpx (VP9), SVT-AV1.
+**NVENC needs NVIDIA driver 610 or newer.** framefields encodes through node-av, whose bundled FFmpeg uses NVENC API 13.1. On RunPod we measured an RTX 3070 host with driver 580.65 (NVENC API 13.0). There, NVENC refused to open ("Required: 13.1 Found: 13.0"), and framefields encoded with libx264 instead. 720p H.264 in software is fast enough that a 12 s, 366-frame film still rendered in 16 s. Frames are drawn on the GPU either way. If hardware encoding matters, pick hosts with newer drivers.
+
Older framefields versions always try the hardware encoder. That fails on GPUs without NVENC and on Linux ARM (`h264_rkmpp`). Set `FRAMEFIELDS_HW_CODECS=off` to always encode in software.
**Where to see it.** `/health` reports the GPU under `components.gpu`, and each result reports it under `engine.gpu`: