osrf / rocker

A tool to run docker containers with overlays and convenient options for things like GUIs etc.
Apache License 2.0
555 stars 70 forks source link

Running --privileged and --nvidia together leads to an error #199

Open sisaha9 opened 1 year ago

sisaha9 commented 1 year ago

Running the following command

rocker --nvidia --privileged --user -- image

results in the following error

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: mount error: file creation failed: /var/lib/docker/overlay2/ab9912469e3ad4db8cf174df0cb5d9b8619972abbc70b111e50bc395b0857480/merged/dev/nvidia-uvm: input/output error: unknown.

What could be causing this error? I have run docker containers with runtime nvidia and privileged before and never gotten this error

tfoote commented 1 year ago

There's a closely related issue here: https://github.com/NVIDIA/nvidia-docker/issues/1648

There may be some interaction that triggers this only when privileged is enabled. And it could also be triggered by a specific image contents as well. I can't reproduce it using generic images like ubuntu:jammy. To be able to help any more I'd need to be able to reproduce the problem.