I have built a GPU device plugin for kubernetes. GPU devices are getting allocated by the plugin, but the GPU drivers are not getting detected inside the container. As much I know, I need to mount several directories in order for the container to detect Nvidia drivers.
I am using the nvidia/cuda:12.0.0-devel-ubuntu22.04 docker image due to which cuda is being detected, but for nvidia drivers I am not sure what all directories needs to be mounted by the device plugin. I have tried mounting /usr/local/nvidia, but it gives me CreateContainerError. Any suggestions ?
You should install nvidia-container-toolkit in all nodes.
Next step edit
/etc/docker/daemon.jsonInstall plugin
You can read more https://github.com/NVIDIA/k8s-device-plugin