Skip to content

feat: request GPUs as CDI devices on Podman engines - #164

Open
oleksandr-nc wants to merge 1 commit into
mainfrom
feat/podman-cdi-gpu
Open

oleksandr-nc wants to merge 1 commit into
mainfrom
feat/podman-cdi-gpu

Conversation

@oleksandr-nc

Copy link
Copy Markdown
Contributor

Podman ignores the nvidia driver in a container's device requests, so ExApps on a CUDA daemon get no GPU when HaRP runs on a Podman engine. AppAPI's Docker Socket Proxy path asked Podman for the GPUs as CDI devices, and nextcloud/app_api#1209 removes that path, so HaRP has to do it.

Changes

  • On Podman 5.4 or later, a cuda ExApp is created with the CDI device nvidia.com/gpu=all, and without AppAPI's NVIDIA_VISIBLE_DEVICES and NVIDIA_DRIVER_CAPABILITIES variables, which are meant for the NVIDIA runtime hook. HaRP reads the Podman version from the Libpod-Api-Version header of the volume request it already sends, so there is no extra request.
  • Older Podman versions get the same request as before and a warning in HaRP's log. Docker, CPU and ROCm ExApps are unchanged.
  • On Podman the host needs the NVIDIA CDI specification (nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml); without it the container of a CUDA ExApp no longer starts, while before it started without a GPU. The README says so.

Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7da0598d-80ff-41a3-8b73-97148b463019
Commits

Reviewing files that changed from the base of the PR and between 27be1d0 and 6ed182d.

Files selected for processing: 4

  • README.md
  • haproxy_agent.py
  • tests/unit/test_gpu_requests.py
  • tests/unit/test_requests.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant