feat(docker): glibc base with nvenc ffmpeg + par2/7z extractors
Some checks failed
CI / Test (push) Successful in 3m35s
CI / Build (push) Successful in 1m33s
CI / Build-1 (push) Successful in 2m0s
CI / Build-2 (push) Successful in 1m34s
CI / Build-3 (push) Successful in 1m33s
CI / Build-4 (push) Successful in 1m35s
CI / Build-5 (push) Successful in 1m33s
CI / Lint (push) Failing after 2m31s
CI / Coverage (push) Successful in 2m48s
CI / Vet (push) Successful in 2m2s

Alpine/musl can't run NVIDIA's glibc userspace (nvidia-smi, libnvidia-encode,
the static nvenc ffmpeg), so HW transcode was impossible — every 4K/anamorphic
HLS encode fell back to software or failed. Switch the runtime stage to
debian:bookworm-slim + a static BtbN ffmpeg built with nvenc, add par2
(Usenet segment repair) + 7z (RAR/7z extraction), and set
NVIDIA_DRIVER_CAPABILITIES=video,compute,utility so a plain --gpus all (or the
compose device reservation) lights up nvenc with no extra flags. Falls back to
libx264 automatically when no GPU is attached. Build stage cross-compiles
(--platform=BUILDPLATFORM) so multi-arch stays fast; downloads forced over IPv4.
This commit is contained in:
Deivid Soto 2026-06-01 19:36:41 +02:00
parent 8accafbe59
commit c4ddd44a1a
2 changed files with 66 additions and 15 deletions

View file

@ -45,9 +45,21 @@ services:
# Named volume keeps this off your media drive (avoids NFS locking issues).
- unarr-data:/data
# Optional: limit CPU/RAM for transcoding on shared hosts
# --- NVIDIA GPU: hardware transcode (nvenc) ---
# Uncomment on a host with an NVIDIA GPU + nvidia-container-toolkit. The
# image already bundles an nvenc-enabled ffmpeg and sets
# NVIDIA_DRIVER_CAPABILITIES=video,compute,utility, so this device
# reservation is the only thing needed to enable HW transcode. Without a GPU
# the same image falls back to software (libx264) automatically — leave it
# commented. (docker run equivalent: add --gpus all)
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
# # Optional: cap CPU/RAM for transcoding on shared hosts
# limits:
# memory: 2G
# cpus: "4.0"