It is a bit more complicated than expected, so here is the process to add in the installation file:
install nvidia-container-toolkit via yay
docker/arch doesn't support cgroups for systemd, so it needs to be fixed this way:
update the file /etc/nvidia-container-runtime/config.toml by replacing no-cgroups = true with no-cgroups = false
update the default grub configuration /etc/default/grub by adding this systemd.unified_cgroup_hierarchy=false to the variable GRUB_CMDLINE_LINUX_DEFAULT
update grub with the following command grub-mkconfig -o /boot/grub/grub.cfg
It is a bit more complicated than expected, so here is the process to add in the installation file:
nvidia-container-toolkit
via yay/etc/nvidia-container-runtime/config.toml
by replacingno-cgroups = true
withno-cgroups = false
/etc/default/grub
by adding thissystemd.unified_cgroup_hierarchy=false
to the variableGRUB_CMDLINE_LINUX_DEFAULT
grub-mkconfig -o /boot/grub/grub.cfg