Open lahwaacz opened 1 month ago
Using --userns auto
leads to the same error as --userns nomap
.
The hook is trying to open the OCI runtime specification for the container so as to determine the container root. I assume that with the --userns auto|nomap
option, the hook is being run as a user that does not have read access to the path shown in the runc
output. Since nomap
.
The container root is required so as to properly update the ldcache in the container -- or skip the update of the ldcache if it is not present.
Running a container with
--gpus all
and either--userns host
or--userns keep-id
works, but--userns nomap
fails. Note that this was tested on Arch Linux with nvidia-container-toolkit 1.16.1.First with podman 5.2.0 and crun 1.16:
With podman 5.2.0 and runc 1.1.13:
The
failed to determined container root: failed to open OCI spec file
message (notable for its grammar error) comes fromupdate-ldcache.go
:https://github.com/NVIDIA/nvidia-container-toolkit/blob/4f0de9f1ef07abd6c1b3dd54995b275fb74d14dc/cmd/nvidia-cdi-hook/update-ldcache/update-ldcache.go#L103-L106
(Unrelated rant at crun and runc: neither of their output is complete, but they complement each other - crun shows which hook failed and runc shows the actual error message...)