2026-05-20 13:48:27 -04:00
|
|
|
# Wild Dragon MAM — Worker Node Stack
|
|
|
|
|
# ─────────────────────────────────────
|
|
|
|
|
# Deploy on any machine you want to join the cluster as a worker.
|
|
|
|
|
# The primary stack (mam-api, db, redis) continues running on TrueNAS.
|
|
|
|
|
#
|
|
|
|
|
# Required env vars (set in .env.worker or export before running):
|
|
|
|
|
# MAM_API_URL URL of the primary MAM API e.g. http://10.0.0.25:47432
|
|
|
|
|
# NODE_TOKEN Bearer token from the primary's Tokens page
|
2026-05-21 00:14:33 -04:00
|
|
|
# NODE_IP Host LAN IP to report (set by onboard-node.sh)
|
2026-05-20 13:48:27 -04:00
|
|
|
#
|
2026-05-20 14:19:21 -04:00
|
|
|
# Optional hardware overrides (if Docker can't see /dev directly):
|
|
|
|
|
# GPU_COUNT Number of NVIDIA GPUs on this node (default: auto-detect from /dev/nvidia*)
|
2026-05-21 00:14:33 -04:00
|
|
|
# BMD_COUNT Number of Blackmagic DeckLink cards (default: auto-detect from /dev/blackmagic/)
|
|
|
|
|
# BMD_MODEL Marketed card name (e.g. "DeckLink Duo 2") — drives the port-diagram UI
|
2026-05-20 14:19:21 -04:00
|
|
|
#
|
|
|
|
|
# Optional env vars (needed only if starting the worker or capture profiles):
|
2026-05-20 13:48:27 -04:00
|
|
|
# REDIS_URL, DATABASE_URL, S3_ENDPOINT, S3_BUCKET, S3_ACCESS_KEY, S3_SECRET_KEY
|
2026-05-20 14:19:21 -04:00
|
|
|
# BMD_DEVICE_0 DeckLink device path (default: /dev/blackmagic/dv0)
|
chore: 1.2 ship-prep sweep — close 38 issues
Frontend / UX / a11y
- Sidebar collapse/expand toggle with localStorage persistence (#142)
- Settings sections wrap inputs in <form> with Enter-to-submit + native
validation; password autocomplete=new-password (#141, #138)
- Asset thumbnails get descriptive alt text (#140)
- Production deploy now precompiles JSX via esbuild and loads the
production React UMD instead of dev builds + in-browser Babel (#139,
#122)
- Search wrapper gets role=search; global search input gets aria-label,
role=combobox, aria-controls/aria-expanded/aria-activedescendant
wiring (#137, #135)
- Dashboard and Library no longer share the same nav icon (#136)
- Sidebar collapses off-canvas with a topbar menu button below 768 px;
mobile default is collapsed (#134)
- --text-3 bumped to #8B92A0 for WCAG AA contrast on --bg-0 (#133)
- Schedule and Library routes were rendering empty inside the .main
flex container — switched to flex:1 + min-height:0 (#131, #132,
editor + asset detail get the same fix)
- Jobs nav badge now polls /jobs?status=active every 10 s and reflects
the live count (#130, #113)
- aria-label sweep on every icon-only button (#126)
- Premiere panel release list moved to window.PREMIERE_RELEASES in
data.jsx; Editor + Settings read from the same source (#125)
- Typo setPgMclips → setPgmClips (#124)
- Stray console.error / console.warn calls gated behind
window.DF_LOG.{warn,error} (#123)
- Hardcoded /api/v1 paths route through window.ZAMPP_API_PREFIX (#115)
- Schedule rows no longer crash on null recorder_id (#117)
- EditorKeyboard guards against document.activeElement === null (#116)
- Unmount-safe timers for PasswordResetModal, Containers, Editor (#111)
- Player seek clamps below totalMs, server-side range clamping +
uncached 416 on EOF, client-side EOF-stall watchdog (#143)
- Duration badge overlap fix on narrow asset cards (#52)
Backend / security / reliability
- GET /recorders fixed N+1: single LATERAL JOIN for live_asset_id;
Docker inspects bounded to actually-recording rows (#121)
- Upload disk-storage (multer.diskStorage) streams parts to S3 instead
of buffering 500 MB in RAM (#120)
- /assets list clamps limit to MAX_LIMIT=500 to prevent OOM (#119)
- SDK upload archive listing + post-extract sanitize block zip-slip /
tar-slip and symlink escapes (#118)
- Migrations track applied state in schema_migrations, run in a
transaction, and exit non-zero on failure (#107)
- node-agent BMD_COUNT override uses BMD_DEVICE_PREFIX; filesystem
detection wins (#109, #127)
- GPU_COUNT override now merges with nvidia-smi enrichment (#108)
- /cluster/heartbeat requires a node-bound token or admin user;
tokens carry bound_hostname (#106)
- /recorders/:id/start error responses no longer echo the Docker
create payload — env vars stay out of client responses (#105)
- /recorders/probe restricts schemes (srt/rtmp/rtsp/udp/rtp), blocks
private + loopback hosts for non-admins, denies common service
ports (#104)
- Scheduler tick guarded by a Postgres advisory lock; pending/running
rows claimed via UPDATE...RETURNING + FOR UPDATE SKIP LOCKED to
survive multi-node deploys (#103)
- UUID validateUuid('id') param middleware on every /:id route (#102)
- Error handler scrubs Postgres error messages and 5xx detail (#101)
- Graceful SIGTERM/SIGINT shutdown — stops scheduler, drains the HTTP
server, ends the pool, 25 s force-exit watchdog (#100)
- AMPP sync moved from fire-and-forget to a persisted retry queue
(ampp_sync_status / attempts / next_attempt_at + scheduler retry
loop with exponential backoff) (#77)
Migrations
- 019: api_tokens.bound_hostname (#106)
- 020: assets.ampp_sync_status + retry bookkeeping (#77)
Other
- Defer #92 Growing-files per-upload toggle, #80 Audio tab, #57
Dashboard redesign, #56 Editor SPA polish phase 3, #114 S3
migration tool to v1.3
2026-05-26 22:06:14 -04:00
|
|
|
# (DeckLink IO / Quad cards expose /dev/blackmagic/io* instead — set BMD_DEVICE_PREFIX=io)
|
2026-05-20 14:19:21 -04:00
|
|
|
# BMD_DEVICE_1 DeckLink device path (default: /dev/blackmagic/dv1)
|
chore: 1.2 ship-prep sweep — close 38 issues
Frontend / UX / a11y
- Sidebar collapse/expand toggle with localStorage persistence (#142)
- Settings sections wrap inputs in <form> with Enter-to-submit + native
validation; password autocomplete=new-password (#141, #138)
- Asset thumbnails get descriptive alt text (#140)
- Production deploy now precompiles JSX via esbuild and loads the
production React UMD instead of dev builds + in-browser Babel (#139,
#122)
- Search wrapper gets role=search; global search input gets aria-label,
role=combobox, aria-controls/aria-expanded/aria-activedescendant
wiring (#137, #135)
- Dashboard and Library no longer share the same nav icon (#136)
- Sidebar collapses off-canvas with a topbar menu button below 768 px;
mobile default is collapsed (#134)
- --text-3 bumped to #8B92A0 for WCAG AA contrast on --bg-0 (#133)
- Schedule and Library routes were rendering empty inside the .main
flex container — switched to flex:1 + min-height:0 (#131, #132,
editor + asset detail get the same fix)
- Jobs nav badge now polls /jobs?status=active every 10 s and reflects
the live count (#130, #113)
- aria-label sweep on every icon-only button (#126)
- Premiere panel release list moved to window.PREMIERE_RELEASES in
data.jsx; Editor + Settings read from the same source (#125)
- Typo setPgMclips → setPgmClips (#124)
- Stray console.error / console.warn calls gated behind
window.DF_LOG.{warn,error} (#123)
- Hardcoded /api/v1 paths route through window.ZAMPP_API_PREFIX (#115)
- Schedule rows no longer crash on null recorder_id (#117)
- EditorKeyboard guards against document.activeElement === null (#116)
- Unmount-safe timers for PasswordResetModal, Containers, Editor (#111)
- Player seek clamps below totalMs, server-side range clamping +
uncached 416 on EOF, client-side EOF-stall watchdog (#143)
- Duration badge overlap fix on narrow asset cards (#52)
Backend / security / reliability
- GET /recorders fixed N+1: single LATERAL JOIN for live_asset_id;
Docker inspects bounded to actually-recording rows (#121)
- Upload disk-storage (multer.diskStorage) streams parts to S3 instead
of buffering 500 MB in RAM (#120)
- /assets list clamps limit to MAX_LIMIT=500 to prevent OOM (#119)
- SDK upload archive listing + post-extract sanitize block zip-slip /
tar-slip and symlink escapes (#118)
- Migrations track applied state in schema_migrations, run in a
transaction, and exit non-zero on failure (#107)
- node-agent BMD_COUNT override uses BMD_DEVICE_PREFIX; filesystem
detection wins (#109, #127)
- GPU_COUNT override now merges with nvidia-smi enrichment (#108)
- /cluster/heartbeat requires a node-bound token or admin user;
tokens carry bound_hostname (#106)
- /recorders/:id/start error responses no longer echo the Docker
create payload — env vars stay out of client responses (#105)
- /recorders/probe restricts schemes (srt/rtmp/rtsp/udp/rtp), blocks
private + loopback hosts for non-admins, denies common service
ports (#104)
- Scheduler tick guarded by a Postgres advisory lock; pending/running
rows claimed via UPDATE...RETURNING + FOR UPDATE SKIP LOCKED to
survive multi-node deploys (#103)
- UUID validateUuid('id') param middleware on every /:id route (#102)
- Error handler scrubs Postgres error messages and 5xx detail (#101)
- Graceful SIGTERM/SIGINT shutdown — stops scheduler, drains the HTTP
server, ends the pool, 25 s force-exit watchdog (#100)
- AMPP sync moved from fire-and-forget to a persisted retry queue
(ampp_sync_status / attempts / next_attempt_at + scheduler retry
loop with exponential backoff) (#77)
Migrations
- 019: api_tokens.bound_hostname (#106)
- 020: assets.ampp_sync_status + retry bookkeeping (#77)
Other
- Defer #92 Growing-files per-upload toggle, #80 Audio tab, #57
Dashboard redesign, #56 Editor SPA polish phase 3, #114 S3
migration tool to v1.3
2026-05-26 22:06:14 -04:00
|
|
|
# BMD_DEVICE_PREFIX Naming prefix for synthesized BMD_COUNT-based devices (default: dv). Use 'io' for IO/Quad.
|
2026-05-21 18:51:11 -04:00
|
|
|
# LIVE_DIR Host path for HLS live segments (default: /mnt/NVME/MAM/wild-dragon-live)
|
2026-05-20 14:19:21 -04:00
|
|
|
#
|
|
|
|
|
# Profiles:
|
|
|
|
|
# (default) node-agent only — cluster visibility + hardware heartbeat
|
2026-05-21 00:14:33 -04:00
|
|
|
# --profile worker + CPU/GPU job worker (proxy generation, transcoding)
|
2026-05-20 14:19:21 -04:00
|
|
|
# --profile capture + SDI capture service (requires Blackmagic DeckLink card)
|
|
|
|
|
#
|
|
|
|
|
# To enable GPU transcoding, also apply docker-compose.gpu.yml:
|
|
|
|
|
# docker compose -f docker-compose.worker.yml -f docker-compose.gpu.yml --profile worker up -d
|
2026-05-21 18:51:11 -04:00
|
|
|
#
|
|
|
|
|
# NOTE: The node-agent mounts /var/run/docker.sock to spawn on-demand SDI
|
|
|
|
|
# capture sidecars when the primary mam-api routes a recorder to this node.
|
|
|
|
|
# Build the capture image before first use:
|
|
|
|
|
# docker compose -f docker-compose.worker.yml build capture
|
2026-05-20 13:48:27 -04:00
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
2026-05-21 00:14:33 -04:00
|
|
|
# node-agent runs in host network mode so it can see the real host
|
|
|
|
|
# interfaces, GPU devices and DeckLink cards without bridging tricks.
|
|
|
|
|
# The reported IP / hostname will be the host's, not the container's.
|
2026-05-20 13:48:27 -04:00
|
|
|
node-agent:
|
|
|
|
|
build: ./services/node-agent
|
|
|
|
|
restart: unless-stopped
|
2026-05-21 00:14:33 -04:00
|
|
|
network_mode: host
|
2026-06-02 06:48:09 -04:00
|
|
|
pid: host
|
2026-05-20 13:48:27 -04:00
|
|
|
environment:
|
|
|
|
|
MAM_API_URL: ${MAM_API_URL}
|
|
|
|
|
NODE_TOKEN: ${NODE_TOKEN:-}
|
|
|
|
|
NODE_ROLE: ${NODE_ROLE:-worker}
|
2026-06-01 09:00:34 -04:00
|
|
|
# NODE_NAME pins the cluster identity (heartbeat key). Set it per-node so
|
|
|
|
|
# cloned VMs that share /etc/hostname don't collide on the same
|
|
|
|
|
# cluster_nodes row. Falls back to the OS hostname when unset.
|
|
|
|
|
NODE_NAME: ${NODE_NAME:-}
|
2026-05-21 00:14:33 -04:00
|
|
|
NODE_IP: ${NODE_IP:-}
|
|
|
|
|
AGENT_PORT: ${AGENT_PORT:-7436}
|
2026-05-20 13:48:27 -04:00
|
|
|
HEARTBEAT_MS: ${HEARTBEAT_MS:-30000}
|
chore: 1.2 ship-prep sweep — close 38 issues
Frontend / UX / a11y
- Sidebar collapse/expand toggle with localStorage persistence (#142)
- Settings sections wrap inputs in <form> with Enter-to-submit + native
validation; password autocomplete=new-password (#141, #138)
- Asset thumbnails get descriptive alt text (#140)
- Production deploy now precompiles JSX via esbuild and loads the
production React UMD instead of dev builds + in-browser Babel (#139,
#122)
- Search wrapper gets role=search; global search input gets aria-label,
role=combobox, aria-controls/aria-expanded/aria-activedescendant
wiring (#137, #135)
- Dashboard and Library no longer share the same nav icon (#136)
- Sidebar collapses off-canvas with a topbar menu button below 768 px;
mobile default is collapsed (#134)
- --text-3 bumped to #8B92A0 for WCAG AA contrast on --bg-0 (#133)
- Schedule and Library routes were rendering empty inside the .main
flex container — switched to flex:1 + min-height:0 (#131, #132,
editor + asset detail get the same fix)
- Jobs nav badge now polls /jobs?status=active every 10 s and reflects
the live count (#130, #113)
- aria-label sweep on every icon-only button (#126)
- Premiere panel release list moved to window.PREMIERE_RELEASES in
data.jsx; Editor + Settings read from the same source (#125)
- Typo setPgMclips → setPgmClips (#124)
- Stray console.error / console.warn calls gated behind
window.DF_LOG.{warn,error} (#123)
- Hardcoded /api/v1 paths route through window.ZAMPP_API_PREFIX (#115)
- Schedule rows no longer crash on null recorder_id (#117)
- EditorKeyboard guards against document.activeElement === null (#116)
- Unmount-safe timers for PasswordResetModal, Containers, Editor (#111)
- Player seek clamps below totalMs, server-side range clamping +
uncached 416 on EOF, client-side EOF-stall watchdog (#143)
- Duration badge overlap fix on narrow asset cards (#52)
Backend / security / reliability
- GET /recorders fixed N+1: single LATERAL JOIN for live_asset_id;
Docker inspects bounded to actually-recording rows (#121)
- Upload disk-storage (multer.diskStorage) streams parts to S3 instead
of buffering 500 MB in RAM (#120)
- /assets list clamps limit to MAX_LIMIT=500 to prevent OOM (#119)
- SDK upload archive listing + post-extract sanitize block zip-slip /
tar-slip and symlink escapes (#118)
- Migrations track applied state in schema_migrations, run in a
transaction, and exit non-zero on failure (#107)
- node-agent BMD_COUNT override uses BMD_DEVICE_PREFIX; filesystem
detection wins (#109, #127)
- GPU_COUNT override now merges with nvidia-smi enrichment (#108)
- /cluster/heartbeat requires a node-bound token or admin user;
tokens carry bound_hostname (#106)
- /recorders/:id/start error responses no longer echo the Docker
create payload — env vars stay out of client responses (#105)
- /recorders/probe restricts schemes (srt/rtmp/rtsp/udp/rtp), blocks
private + loopback hosts for non-admins, denies common service
ports (#104)
- Scheduler tick guarded by a Postgres advisory lock; pending/running
rows claimed via UPDATE...RETURNING + FOR UPDATE SKIP LOCKED to
survive multi-node deploys (#103)
- UUID validateUuid('id') param middleware on every /:id route (#102)
- Error handler scrubs Postgres error messages and 5xx detail (#101)
- Graceful SIGTERM/SIGINT shutdown — stops scheduler, drains the HTTP
server, ends the pool, 25 s force-exit watchdog (#100)
- AMPP sync moved from fire-and-forget to a persisted retry queue
(ampp_sync_status / attempts / next_attempt_at + scheduler retry
loop with exponential backoff) (#77)
Migrations
- 019: api_tokens.bound_hostname (#106)
- 020: assets.ampp_sync_status + retry bookkeeping (#77)
Other
- Defer #92 Growing-files per-upload toggle, #80 Audio tab, #57
Dashboard redesign, #56 Editor SPA polish phase 3, #114 S3
migration tool to v1.3
2026-05-26 22:06:14 -04:00
|
|
|
GPU_COUNT: ${GPU_COUNT:--1}
|
|
|
|
|
BMD_COUNT: ${BMD_COUNT:--1}
|
|
|
|
|
BMD_MODEL: ${BMD_MODEL:-}
|
|
|
|
|
BMD_DEVICE_PREFIX: ${BMD_DEVICE_PREFIX:-dv}
|
2026-05-21 18:51:11 -04:00
|
|
|
LIVE_DIR: ${LIVE_DIR:-/mnt/NVME/MAM/wild-dragon-live}
|
2026-05-31 18:14:59 -04:00
|
|
|
# REPO_DIR: host path to the checked-out repo. The agent passes this to the
|
|
|
|
|
# one-shot driver-install container so install-driver.sh can read
|
|
|
|
|
# sdk/<vendor>/ and run deploy/install-driver.sh. Must match the host path
|
|
|
|
|
# bind-mounted below (onboard-node.sh clones to /opt/wild-dragon).
|
|
|
|
|
REPO_DIR: ${REPO_DIR:-/opt/wild-dragon}
|
2026-05-21 00:14:33 -04:00
|
|
|
volumes:
|
2026-05-21 18:51:11 -04:00
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2026-05-21 00:14:33 -04:00
|
|
|
- /dev:/dev:ro
|
2026-05-28 23:20:02 -04:00
|
|
|
- /mnt/NVME/MAM/wild-dragon-live:/mnt/NVME/MAM/wild-dragon-live:ro
|
2026-05-31 18:14:59 -04:00
|
|
|
# Capture-driver deployment ("Capture Drivers / SDKs" in the Cluster admin
|
|
|
|
|
# screen): the agent itself does NOT run dkms/modprobe — it spawns a
|
|
|
|
|
# separate privileged ubuntu container that bind-mounts these host paths.
|
|
|
|
|
# The agent only needs to *see* the repo path so it can pass it through as
|
|
|
|
|
# a bind to that container; no extra privileges are granted to the agent.
|
|
|
|
|
# /opt/wild-dragon → repo (sdk/<vendor>/ + deploy/install-driver.sh)
|
|
|
|
|
# The install container additionally mounts /lib/modules,/usr/src,/boot,
|
|
|
|
|
# /dev and /opt from the host (handled in the agent, not here) so DKMS /
|
|
|
|
|
# modprobe / ldconfig affect the host kernel.
|
|
|
|
|
- ${REPO_DIR:-/opt/wild-dragon}:${REPO_DIR:-/opt/wild-dragon}:ro
|
2026-05-21 18:51:11 -04:00
|
|
|
devices:
|
|
|
|
|
- /dev/blackmagic:/dev/blackmagic
|
2026-05-20 13:48:27 -04:00
|
|
|
|
|
|
|
|
worker:
|
|
|
|
|
build: ./services/worker
|
|
|
|
|
profiles: [worker]
|
|
|
|
|
restart: unless-stopped
|
2026-06-02 20:46:48 -04:00
|
|
|
privileged: true
|
2026-05-20 13:48:27 -04:00
|
|
|
environment:
|
|
|
|
|
REDIS_URL: ${REDIS_URL}
|
|
|
|
|
DATABASE_URL: ${DATABASE_URL}
|
|
|
|
|
S3_ENDPOINT: ${S3_ENDPOINT}
|
|
|
|
|
S3_BUCKET: ${S3_BUCKET}
|
|
|
|
|
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
|
|
|
|
|
S3_SECRET_KEY: ${S3_SECRET_KEY}
|
|
|
|
|
S3_REGION: ${S3_REGION:-us-east-1}
|
2026-05-20 14:19:21 -04:00
|
|
|
NVENC_ENABLED: ${NVENC_ENABLED:-false}
|
2026-06-02 20:46:48 -04:00
|
|
|
GROWING_PATH: /growing
|
2026-05-20 14:19:21 -04:00
|
|
|
networks:
|
|
|
|
|
- wild-dragon-worker
|
|
|
|
|
|
|
|
|
|
# SDI capture service — only start on nodes with Blackmagic DeckLink cards
|
|
|
|
|
# Set BMD_DEVICE_0 in .env.worker to the actual device path, e.g. /dev/blackmagic/dv0
|
|
|
|
|
capture:
|
|
|
|
|
build: ./services/capture
|
|
|
|
|
profiles: [capture]
|
|
|
|
|
restart: unless-stopped
|
2026-06-02 17:31:06 -04:00
|
|
|
runtime: nvidia
|
2026-05-20 14:19:21 -04:00
|
|
|
environment:
|
|
|
|
|
REDIS_URL: ${REDIS_URL}
|
|
|
|
|
DATABASE_URL: ${DATABASE_URL}
|
|
|
|
|
S3_ENDPOINT: ${S3_ENDPOINT}
|
|
|
|
|
S3_BUCKET: ${S3_BUCKET}
|
|
|
|
|
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
|
|
|
|
|
S3_SECRET_KEY: ${S3_SECRET_KEY}
|
|
|
|
|
CAPTURE_PORT: 3001
|
2026-06-02 17:31:06 -04:00
|
|
|
NVIDIA_VISIBLE_DEVICES: all
|
|
|
|
|
NVIDIA_DRIVER_CAPABILITIES: video,compute,utility
|
2026-05-20 14:19:21 -04:00
|
|
|
devices:
|
|
|
|
|
- ${BMD_DEVICE_0:-/dev/blackmagic/dv0}:/dev/blackmagic/dv0
|
|
|
|
|
- ${BMD_DEVICE_1:-/dev/blackmagic/dv1}:/dev/blackmagic/dv1
|
|
|
|
|
ports:
|
|
|
|
|
- "${CAPTURE_PORT:-7437}:3001"
|
2026-05-20 13:48:27 -04:00
|
|
|
networks:
|
|
|
|
|
- wild-dragon-worker
|
|
|
|
|
|
2026-05-29 00:00:10 -04:00
|
|
|
# worker-l4: HEAVY tier (proxy/conform/trim) on the L4 (NVENC). Talks to
|
|
|
|
|
# zampp1's Redis/Postgres/S3 over the LAN (.200). No promotion scanner here.
|
|
|
|
|
worker-l4:
|
2026-05-31 17:37:37 -04:00
|
|
|
profiles: [gpu]
|
2026-05-29 00:00:10 -04:00
|
|
|
build:
|
|
|
|
|
context: ./services/worker
|
|
|
|
|
dockerfile: Dockerfile.gpu
|
|
|
|
|
image: wild-dragon-worker-gpu:latest
|
|
|
|
|
runtime: nvidia
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
REDIS_URL: ${REDIS_URL}
|
|
|
|
|
DATABASE_URL: ${DATABASE_URL}
|
|
|
|
|
S3_ENDPOINT: ${S3_ENDPOINT}
|
|
|
|
|
S3_BUCKET: ${S3_BUCKET}
|
|
|
|
|
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
|
|
|
|
|
S3_SECRET_KEY: ${S3_SECRET_KEY}
|
|
|
|
|
S3_REGION: ${S3_REGION:-us-east-1}
|
|
|
|
|
WORKER_QUEUES: proxy,conform,trim
|
|
|
|
|
PROXY_CONCURRENCY: "3"
|
|
|
|
|
NVIDIA_VISIBLE_DEVICES: GPU-13acf439-8bf4-a5e0-7804-c1071bca547a
|
|
|
|
|
WORKER_LABEL: "zampp2 / L4"
|
|
|
|
|
NVIDIA_DRIVER_CAPABILITIES: video,compute,utility
|
|
|
|
|
networks:
|
|
|
|
|
- wild-dragon-worker
|
|
|
|
|
|
feat(framecache): phase 1 — framecache container + consumer library
- services/framecache/: new standalone container
- slot.h/slot.c: shm ring buffer (120 frames, FC_MAGIC header, atomic
write_cursor, POSIX semaphore per slot)
- registry.h/registry.c: in-memory slot registry + /dev/shm/framecache/
registry.json persistence
- framecache.c: HTTP API server (libmicrohttpd, port 7435)
POST /slots, GET /slots, GET /slots/:id, DELETE /slots/:id, GET /health
- fc_client.h/fc_client.c: consumer library — fc_consumer_open/read/close
with per-consumer cursor, timeout via sem_timedwait, automatic skip+count
when consumer falls behind writer by > ring_depth frames
- fc_test_consumer.c: dev utility to attach to any slot and print fps/stats
- CMakeLists.txt: framecache server + fc_client static lib + test consumer
- Dockerfile: builder + slim runtime stages
- docker-compose.worker.yml: add framecache service (profile: capture,
ipc: host, shm_size from FC_SHM_SIZE_GB env var, healthcheck)
- .env.example: document FC_SHM_SIZE_GB with per-node guidance
2026-06-03 10:53:51 -04:00
|
|
|
# Framecache — shared memory ring buffer for SDI + network ingest fan-out.
|
|
|
|
|
# Runs on every worker node that has capture sources (Blackmagic, Deltacast).
|
|
|
|
|
# IPC host mode lets all capture sidecars share /dev/shm with this container.
|
|
|
|
|
# FC_SHM_SIZE can be tuned per node in .env.worker:
|
|
|
|
|
# Baratheon (251GB RAM): FC_SHM_SIZE=64424509440 (60GB)
|
|
|
|
|
# zampp1 (93GB RAM): FC_SHM_SIZE=42949672960 (40GB)
|
|
|
|
|
# zampp2 (18GB RAM): FC_SHM_SIZE=8589934592 (8GB — increase RAM first)
|
|
|
|
|
framecache:
|
|
|
|
|
build: ./services/framecache
|
|
|
|
|
profiles: [capture]
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
ipc: host
|
|
|
|
|
shm_size: '${FC_SHM_SIZE_GB:-40}gb'
|
|
|
|
|
environment:
|
|
|
|
|
FC_PORT: 7435
|
|
|
|
|
ports:
|
|
|
|
|
- "7435:7435"
|
|
|
|
|
volumes:
|
|
|
|
|
- /dev/shm:/dev/shm
|
|
|
|
|
networks:
|
|
|
|
|
- wild-dragon-worker
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:7435/health"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: 5s
|
|
|
|
|
|
2026-05-20 13:48:27 -04:00
|
|
|
networks:
|
|
|
|
|
wild-dragon-worker:
|
|
|
|
|
driver: bridge
|