render: run the headless renderer image (0.2.0) #5

Merged
oliver.maklott merged 1 commit from render into main 2026-11-19 02:38:00 +01:00

Adds rotocmd render <project> --video <file> --out <dir> [--version] [--cpu] [--json] [-- renderer flags] (D005). It runs the app's headless renderer image (rotoscopia-headless, app 0.11.0) on a project.

  • Version: the installed instance's, so the renderer matches the app that made the project. With no instance, or instances that disagree, it uses latest. --version overrides it.
  • Trust: rotoscopia-headless/<v>/release-trust.json is checked with the existing trust code, and the single image is pulled and run by digest only.
  • GPU: docker info must show the NVIDIA runtime or CDI devices. This is checked before the multi-GB pull. --cpu skips it.
  • Run: docker run --rm [--gpus all] --user uid:gid --read-only --tmpfs /tmp, with the project and video read-only and --out writable. Progress streams live, and --json embeds the renderer summary. Exit codes: 0→0, 2→2, else 1. Ctrl-C stops the container.
  • Tests: 51, 10 new. Docs: D005 and deviations 5–6. Version 0.2.0.

Merge order: after app 0.11.0 is published, and once rotocmd render --cpu has been verified against the real registry.

🤖 Generated with Claude Code

Adds `rotocmd render <project> --video <file> --out <dir> [--version] [--cpu] [--json] [-- renderer flags]` (D005). It runs the app's headless renderer image (`rotoscopia-headless`, app 0.11.0) on a project. - **Version:** the installed instance's, so the renderer matches the app that made the project. With no instance, or instances that disagree, it uses `latest`. `--version` overrides it. - **Trust:** `rotoscopia-headless/<v>/release-trust.json` is checked with the existing trust code, and the single image is pulled and run by digest only. - **GPU:** `docker info` must show the NVIDIA runtime or CDI devices. This is checked before the multi-GB pull. `--cpu` skips it. - **Run:** `docker run --rm [--gpus all] --user uid:gid --read-only --tmpfs /tmp`, with the project and video read-only and `--out` writable. Progress streams live, and `--json` embeds the renderer summary. Exit codes: 0→0, 2→2, else 1. Ctrl-C stops the container. - **Tests:** 51, 10 new. Docs: D005 and deviations 5–6. Version 0.2.0. **Merge order:** after app 0.11.0 is published, and once `rotocmd render --cpu` has been verified against the real registry. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
render: track and export projects with the headless renderer image (0.2.0)
All checks were successful
check / check (pull_request) Successful in 16s
check / check (push) Successful in 17s
6951cc2cf5
`rotocmd render <project> --video <file> --out <dir> [--version] [--cpu] [-- <renderer flags>]`
runs the app's headless renderer (package and image `rotoscopia-headless`, D005):

- the version defaults to the one the Rotoscopia instances on this host run (-i picks one), so
  the renderer matches the app that made the project; latest if there is none or they differ;
- release-trust.json is checked with the bundle code (payload hash, version, signature mode,
  exactly one image tagged with the version), and the image is pulled and run by digest;
- before the pull, `docker info` must show an nvidia runtime or nvidia.com/gpu CDI devices,
  unless --cpu (which passes --device cpu instead of --gpus all);
- docker run --rm --user <uid>:<gid> --read-only --tmpfs /tmp, project and video directories
  mounted read-only, --out (created) writable; --video, --out, --device, --models and
  --project-out after -- are wrong usage;
- the renderer's stderr streams live in both modes; --json embeds its summary with the image,
  digest and version; exit 0/2 kept, anything else 1; Ctrl-C stops the container and exits 1.

Supporting changes: run options take an onStderrLine callback, CliError carries an exit code,
fetchTrust can name a missing version, and the single-image check is shared with fetchBundle.
Tests cover parsing, version choice, trust tampering, the GPU check, the docker run arguments,
exit codes, --json and Ctrl-C. Docs: D005, CLAUDE.md, README, help, deviations 5 and 6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rotostudio/rotocmd!5
No description provided.