Then once you add those lines to the CT's config (either manually or via my script) and restart the CT
nvidia-smi should just magically work inside
Bash:
echo "lxc.hook.pre-start: sh -c '[ ! -f /dev/nvidia0 ] && /usr/bin/nvidia-modprobe -c0 -u'"
echo "lxc.environment: NVIDIA_VISIBLE_DEVICES=all"
echo "lxc.environment: NVIDIA_DRIVER_CAPABILITIES=all"
echo "lxc.hook.mount: /usr/share/lxc/hooks/nvidia"