Please check if you are running on Ubuntu.
There is also a similar topic which has the same error.
No CUDA-capable device is detected on tao detectnet_v2 dataset convert - #4 by NilsAI . For that topic, adding the tag --privileged
helped run without the issues.