Hello. In my quest to resolve the issue explained in my post, I have arrived to this question:
After passing the gpu to my container doing this:
lxc config device add u3 gpu gpu gputype=physical
lxc stop u3
lxc config set u3 nvidia.runtime=true
lxc start u3
I noticed that there is no gpus directory inside /proc/driver/nvidia
(into the container), so no pci bus is accesible inside.
In the host I have a gpus directory that contains something like 0000:07:00.0/ f
or every gpu in my system.
I’ve found a bug report in libnvidia github GPU information not mounted on /proc/driver/nvidia/gpus · Issue #105 · NVIDIA/libnvidia-container · GitHub that comes from GPU information with nvidia.runtime · Issue #7840 · lxc/lxd · GitHub.
Is this a bug in the way LXD passes the GPU to the container? Is there a way to get gpus directory inside the container?