virtualisation.docker.enableNvidia vs hardware.nvidia-container-toolkit.enable

Hi! My server has an nVidia GPU which I use in a few docker containers that benefit from it (frigate, plex.) I recently upgraded from 23.11 to 24.05, and now I’m seeing this message when building:

trace: warning: You have set virtualisation.docker.enableNvidia. This option is deprecated, please set hardware.nvidia-container-toolkit.enable instead.

If I simply change virtualisation.docker.enableNvidia = true; to hardware.nvidia-container-toolkit.enable = true; in my config, then my GPU-enabled containers fail to start, with this error:

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

I haven’t been able to find any documentation on this change - is there something I’m missing? Is there anything else I’m supposed to do to make this work?

Thanks!

They worked for me when I use docker run with --device nvidia.com/gpu=all and not --gpus all.

That did it. Thanks!