Skip to content

GPU Permission Lost Inside Container #4859

@zhoaxiaohu

Description

@zhoaxiaohu

Description

"Even after applying patch #3824, the issue still persists on systemd version 249."
#3708

Extreme solution
If I comment out the code responsible for generating device properties, preventing systemd from taking over device permissions, the issue is resolved.
Image

Steps to reproduce the issue

systemctl --version
systemd 249 (v249-48)
+PAM +AUDIT +SELINUX -APPARMOR +IMA -SMACK +SECCOMP +GCRYPT +GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 +IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB -ZSTD +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=legacy

docker gust:

nvidia-smi
Wed Aug 20 06:34:52 2025
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.57.02 Driver Version: 470.57.02 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... On | 00000000:3B:00.0 Off | N/A |
| 22% 30C P8 5W / 250W | 1MiB / 11019MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

Host:# systemctl daemon-reload

docker gust:

nvidia-smi
Failed to initialize NVML: Unknown Error

Describe the results you received and expected

GPU permissions are available within the container.

What version of runc are you using?

runc 1.1.4

Host OS information

No response

Host kernel information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions