Issue Description
When using podman compose (backed by the docker-compose plugin), CDI GPU devices specified in the devices: field of a compose file are silently ignored. The container starts without GPU access and falls back to CPU.
The same configuration works correctly with:
podman run --device nvidia.com/gpu=all
podman-compose (pip package)
Steps to reproduce the issue
- Generate CDI spec:
sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml
- Create
compose.yaml:
services:
test:
image: nvcr.io/nvidia/cuda:12.2.0-base-ubuntu22.04
command: nvidia-smi
devices:
- nvidia.com/gpu=all
security_opt:
- label=disable
- Run:
Describe the results you received
CDI device is ignored. Container starts without GPU. No error or warning is shown.
Describe the results you expected
Container starts with GPU access. nvidia-smi runs successfully inside the container.
podman info output
- OS: Ubuntu 24.04
- Podman version: 4.9.3
- Compose backend: `/usr/libexec/docker/cli-plugins/docker-compose` v2.37.1
- nvidia-container-toolkit: 1.19.0
- GPU: NVIDIA Tesla T4
- CDI spec: generated at `/etc/cdi/nvidia.yaml`
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
No response
Additional information
Workaround
Using podman run directly with --device nvidia.com/gpu=all works correctly.
Using podman-compose (pip package) also works correctly.
Additional Notes
The deploy.resources.reservations.devices block with driver: cdi is also ignored by the docker-compose backend.
This appears to be because podman compose delegates to the docker-compose plugin which does not honor CDI device syntax, bypassing podman's native CDI handling entirely.
Issue Description
When using
podman compose(backed by thedocker-composeplugin), CDI GPU devices specified in thedevices:field of a compose file are silently ignored. The container starts without GPU access and falls back to CPU.The same configuration works correctly with:
podman run --device nvidia.com/gpu=allpodman-compose(pip package)Steps to reproduce the issue
compose.yaml:Describe the results you received
CDI device is ignored. Container starts without GPU. No error or warning is shown.
Describe the results you expected
Container starts with GPU access.
nvidia-smiruns successfully inside the container.podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
No response
Additional information
Workaround
Using
podman rundirectly with--device nvidia.com/gpu=allworks correctly.Using
podman-compose(pip package) also works correctly.Additional Notes
The
deploy.resources.reservations.devicesblock withdriver: cdiis also ignored by the docker-compose backend.This appears to be because
podman composedelegates to thedocker-composeplugin which does not honor CDI device syntax, bypassing podman's native CDI handling entirely.