Use the preinstalled stack
NVIDIA DGX OS is based on Ubuntu 24.04 and comes with CUDA and the NVIDIA AI software stack. After the first login, check the installed driver and CUDA versions, then install dependencies as required by the application. The base OS version does not guarantee that every framework will run without additional setup.