Conversation
|
| Filename | Overview |
|---|---|
| Dockerfile | Adds an ARG INSTALL_GPU_LIBS=0 opt-in block that installs VA-API libraries only when the build arg is set; CPU-only default is preserved and cache cleanup is correct. |
| docker_init.bash | New loop maps Docker supplemental GIDs to named groups before su; logic is sound but contains a redundant if [ -n "$group_name" ] guard after an unconditional continue on the empty-name path. |
| docs/docker.md | Adds GPU build/runtime documentation; the Compose NVIDIA snippet uses gpus: all which is not a valid service-level key in Docker Compose (previously flagged). |
| tests/test_docker_gpu_runtime_docs.py | New static coverage tests; test_docker_docs_cover_nvidia_host_runtime_guidance asserts the invalid gpus: all Compose key, which will break if the docs are corrected. |
| CHANGELOG.md | Adds an Unreleased entry for the optional GPU image path; correctly placed and accurately describes the change. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[docker build] -->|INSTALL_GPU_LIBS=0 default| B[CPU-only image]
A -->|INSTALL_GPU_LIBS=1| C[GPU image\nlibva2 + vainfo + mesa-va-drivers\n+ intel-media-va-driver-non-free?]
D[Container starts as root] --> E{Loop: id -G supplemental GIDs}
E -->|GID=0 or WANTED_GID| F[skip]
E -->|known GID| G[getent group → group_name]
E -->|unknown GID| H[groupadd hostgpu<N>]
H --> G
G -->|found| I[usermod -a -G group_name hermeswebui]
G -->|still empty| J[WARNING: GPU device access may be unavailable]
I --> K[exec su → hermeswebui]
J --> K
K --> L[WebUI process with /dev/dri access preserved]
Reviews (2): Last reviewed commit: "test(docker): defer GPU docs fixture rea..." | Re-trigger Greptile
… opt-in Docker GPU) (#3757) * fix(terminal): reap reparented terminal descendants by process group (#3725, #2577) Embedded-terminal descendants reparented to the WebUI process could linger as zombies. The reaper now calls os.waitpid(-terminal_pgid, WNOHANG) scoped to the terminal's own process group (terminals spawn with start_new_session=True, so proc.pid == pgid) rather than process-wide waitpid(-1), which would otherwise reap unrelated WebUI subprocess children and silently coerce their exit codes to 0. Bounded by a 64-iteration limit and lock-guarded. Runs on reader cleanup and terminal close. Co-authored-by: rodboev <rodboev@users.noreply.github.com> * docs(docker): add opt-in GPU runtime image path (#3721, #3243) The default image stays CPU-only. A new INSTALL_GPU_LIBS=1 build arg installs VA-API user-space libraries for users passing through host GPU devices, and docker_init.bash preserves Docker --group-add supplemental groups (e.g. render/ video for /dev/dri) when dropping privileges to the runtime user. Default (INSTALL_GPU_LIBS=0) is a no-op. Docs + regression test included. Co-authored-by: rodboev <rodboev@users.noreply.github.com> * docs(changelog): stamp v0.51.304 — Release JT (stage-p2a #3725 #3721) --------- Co-authored-by: nesquena-hermes <[email protected]> Co-authored-by: rodboev <rodboev@users.noreply.github.com>
… opt-in Docker GPU) (nesquena#3757) * fix(terminal): reap reparented terminal descendants by process group (nesquena#3725, nesquena#2577) Embedded-terminal descendants reparented to the WebUI process could linger as zombies. The reaper now calls os.waitpid(-terminal_pgid, WNOHANG) scoped to the terminal's own process group (terminals spawn with start_new_session=True, so proc.pid == pgid) rather than process-wide waitpid(-1), which would otherwise reap unrelated WebUI subprocess children and silently coerce their exit codes to 0. Bounded by a 64-iteration limit and lock-guarded. Runs on reader cleanup and terminal close. Co-authored-by: rodboev <rodboev@users.noreply.github.com> * docs(docker): add opt-in GPU runtime image path (nesquena#3721, nesquena#3243) The default image stays CPU-only. A new INSTALL_GPU_LIBS=1 build arg installs VA-API user-space libraries for users passing through host GPU devices, and docker_init.bash preserves Docker --group-add supplemental groups (e.g. render/ video for /dev/dri) when dropping privileges to the runtime user. Default (INSTALL_GPU_LIBS=0) is a no-op. Docs + regression test included. Co-authored-by: rodboev <rodboev@users.noreply.github.com> * docs(changelog): stamp v0.51.304 — Release JT (stage-p2a nesquena#3725 nesquena#3721) --------- Co-authored-by: nesquena-hermes <[email protected]> Co-authored-by: rodboev <rodboev@users.noreply.github.com>
Thinking Path
What Changed
Dockerfile: add an opt-in GPU package install path guarded by a build arg.docker_init.bash: preserve Docker-provided supplemental groups before dropping to thehermeswebuiruntime user, so/dev/drigroup access survives startup.docs/docker.md: document GPU image build, Intel/AMD/dev/drimapping, NVIDIA host runtime prerequisites, and verification caveats.CHANGELOG.md: add an Unreleased note for the optional GPU image path.tests/test_docker_gpu_runtime_docs.py: add static coverage for the opt-in behavior and docs.Why It Matters
Users running media or inference workloads in containers get a supported starting point without bloating or changing the default image for everyone else.
Verification
If Docker is available:
Risks / Follow-ups
Model Used
GPT-5.5 via Codex CLI; implementation and adversarial review assisted by Codex/Claude agents.