From e49be6d04e17d7cc7ad89bd8db38d6ee00a7fc80 Mon Sep 17 00:00:00 2001 From: javis-bot Date: Tue, 23 Jun 2026 00:16:12 +0900 Subject: [PATCH] fix: add `video` driver capability so NVENC works in the container The Go-Live broadcast encodes with h264_nvenc, but the image only requested NVIDIA_DRIVER_CAPABILITIES=compute,utility. The NVIDIA Container Toolkit gates which driver libraries it injects by capability, and the NVENC/NVDEC libs (libnvidia-encode.so.1 / libnvidia-decode.so.1) come with the `video` capability. Without it the broadcast ffmpeg dies with "Cannot load libnvidia-encode.so.1", the capture produces no packets, and Go-Live never connects, while CUDA workloads (ollama/whisper/melo) and nvidia-smi keep working because compute+utility are present. Add `video` so hardware encode is available. Applies to both Linux (CDI) and Windows Docker Desktop (WSL2). Co-Authored-By: Claude Opus 4.7 --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e28c678..0f5c837 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,14 @@ ENV DEBIAN_FRONTEND=noninteractive \ DISPLAY=:1 \ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 \ PATH=/opt/venv/bin:/root/.bun/bin:/usr/local/bin:/usr/bin:/bin \ - NVIDIA_VISIBLE_DEVICES=all \ - NVIDIA_DRIVER_CAPABILITIES=compute,utility + NVIDIA_VISIBLE_DEVICES=all + +# `video` is REQUIRED for NVENC/NVDEC: it tells the NVIDIA Container Toolkit to +# inject libnvidia-encode.so.1 / libnvidia-decode.so.1 into the container. With +# only `compute,utility` you get CUDA (ollama/whisper/melo) + nvidia-smi, but the +# Go-Live broadcast's h264_nvenc fails with "Cannot load libnvidia-encode.so.1". +# Applies on both Linux (CDI) and Windows Docker Desktop (WSL2). +ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video # --- System packages: desktop, VNC, Chrome deps, ffmpeg, python, ocr --- RUN apt-get update && apt-get install -y --no-install-recommends \