feat: enable graphical GPU access out of the box for gpu=all projects#396
feat: enable graphical GPU access out of the box for gpu=all projects#396konard wants to merge 2 commits into
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: ProverCoderAI#395
|
Warning Review limit reached
More reviews will be available in 30 minutes and 12 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughОбзорВ этом PR обновлён файл ИзмененияСлужебное обновление метаданных генерации
Оценка сложности проверки🎯 1 (Тривиально) | ⏱️ ~1 минута Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 2 warnings)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Generated dev containers with gpu: "all" now set NVIDIA_DRIVER_CAPABILITIES=all and NVIDIA_VISIBLE_DEVICES=all so the NVIDIA runtime injects the graphics/display libraries (libGLX_nvidia, libEGL_nvidia) at container creation, and the image registers the NVIDIA EGL vendor ICD at /usr/share/glvnd/egl_vendor.d/10_nvidia.json. This removes the manual per-container env edit, recreate, and vendor-JSON copy previously required for graphical GPU/EGL over SSH. Non-GPU projects are unaffected. Edits both source-of-truth template copies (lib + vendored app) and adds tests covering compose env wiring and the Dockerfile EGL ICD registration. Refs ProverCoderAI#395
Working session summaryDone. Issue #395 is fully addressed and PR #396 is ready for review. SummaryProblem: Graphical GPU access inside docker-git dev containers required manual, per-container steps over SSH — adding Fix (gated on the existing
Both source-of-truth template copies were updated ( Verification:
Note on CodeRabbit: its review was rate-limited and only saw the base placeholder commit ( PR: #396 (ready for review, title This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $6.894868📊 Context and tokens usage:Claude Opus 4.8: (2 sub-sessions)
Total: (11.5K new + 203.7K cache writes + 8.8M cache reads) input tokens, 47.2K output tokens, $6.894869 cost 🤖 Models used:
📎 Log file uploaded as Gist (3298KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Source TZ / Issues
Summary
Make graphical GPU access work out of the box for projects configured with
gpu: "all". Previously,gpus: allalone only exposed the compute/utility GPU capabilities; getting EGL/GLX (graphics/display) working required manual, per-container steps:NVIDIA_DRIVER_CAPABILITIES=all(andNVIDIA_VISIBLE_DEVICES=all) to the container env and recreating the container so the NVIDIA runtime injectslibGLX_nvidia/libEGL_nvidia./usr/share/glvnd/egl_vendor.d/10_nvidia.json.This PR automates both, gated on the existing
gpu === "all"flag:docker-compose.ymlenvironment now includesNVIDIA_VISIBLE_DEVICES: "all"andNVIDIA_DRIVER_CAPABILITIES: "all"on the main service (only whengpu: "all")./usr/share/glvnd/egl_vendor.d/10_nvidia.jsonso glvnd resolveslibEGL_nvidia.so.0at runtime (the driver library itself is injected by the NVIDIA runtime).CUDA/
nvccis intentionally not installed: the issue investigation established it is not required for graphical EGL/GLX access, only the driver capabilities and the EGL vendor ICD.Both source-of-truth template copies are updated to keep the API controller and the CLI consistent:
packages/lib/src/core/templates/*(bundled into thedocker-git-apicontroller)packages/app/src/lib/core/templates/*(vendored copy used by thedocker-gitCLI)Requirements Alignment
renderGpuEnvindocker-compose.tsemits the NVIDIA driver-capability env forgpu: "all", wired into the main service environment block.renderDockerfileGpuindockerfile.tsregisters the EGL vendor ICD JSON forgpu: "all".""for non-GPU projects (established empty-fragment pattern), so non-GPU output is byte-for-byte unchanged.libandapptest suites.minor) for@prover-coder-ai/docker-git.nvcctoolkit installation — not needed for graphical access per the issue investigation.GpuModedomain type or adding new GPU modes.gpu: "all"; no new privileges, mounts, or credentials.Verification
bunx vitest run(packages/lib) — 283 passedbunx vitest run tests/docker-git/(packages/app) — 418 passedbun run --filter @prover-coder-ai/docker-git-lib typecheck— clean (lib/app/api)bun run lint(packages/lib) — exit 0NVIDIA_VISIBLE_DEVICES: "all",NVIDIA_DRIVER_CAPABILITIES: "all", andgpus: all; rendered Dockerfile contains the EGL ICD RUN block. Non-GPU rendering contains none of these.