fix(docker): detect GPU support via CDI for Podman runtimes#273
Conversation
…ia runtime check
GPU detection previously used Docker-specific `info -f '{{.Runtimes.nvidia}}'`
which fails under Podman. Now branches on IsPodman() to check CDI devices
(`info -f '{{.Host.CDIDevices}}'`) for nvidia support. Both paths gracefully
fall back to no-GPU on command errors instead of propagating failures.
✅ Deploy Preview for devsydev canceled.
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
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 |
Match the convention used by all other tests in e2e/tests/up/ so the test is picked up by the CI label filter.
…ge constant - Add //nolint:staticcheck on ExecFunc field declarations in factory.go, kubernetes.go, and legacy_shell.go (legacy bridge types require this type) - Replace "docker" string literal in gpu_detection.go with testDockerCommand constant from the package to satisfy goconst
Summary
GPU detection in
DockerHelper.GPUSupportEnabled()previously relied ondocker info -f '{{.Runtimes.nvidia}}', which is Docker-specific and fails under Podman since Podman does not expose runtimes the same way.This change branches on
IsPodman()to use runtime-appropriate detection: Docker continues checking for the nvidia container runtime, while Podman checks for nvidia CDI (Container Device Interface) devices viapodman info -f '{{.Host.CDIDevices}}'. Both paths now gracefully fall back to "no GPU" with a debug log on command errors, instead of propagating failures to callers.Includes 5 unit tests covering Docker ±nvidia, Podman ±CDI nvidia, and command failure fallback, plus an e2e test validating the detection path runs without crashing under the test environment's container runtime.