nvidia-docker icon indicating copy to clipboard operation
nvidia-docker copied to clipboard

Can we support set permission (read/write/mknod) for GPU

Open Binyang2014 opened this issue 3 years ago • 2 comments

In our case. some container will write data to GPU to finish ML job. But some container only monitor the GPU resources. We want to only give the read permission for monitor container. Can we specification the device permission through nvidia-docker?

For docker I saw we can set the device permission through --device=<Host device>:<Container device>:<Permission mode>

Binyang2014 avatar Feb 16 '22 08:02 Binyang2014

The only device file that is actually written to is /dev/nvidiactl and you need to be able to perform both read and writes from this even in the monitoring case. No data is ever written to the respective /dev/nvidia0,1,2,etc device nodes, but write permission needs to be set on them for the kernel to allow access to them through /dev/nvidiactl (even if just monitoring them).

klueska avatar Feb 16 '22 10:02 klueska

Got it. Thanks for your reply

Binyang2014 avatar Feb 16 '22 12:02 Binyang2014