3. Setup NVIDIA Container Toolkit: Add the NVIDIA GPG key: bash Copy code curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - Add the NVIDIA Docker repository: For distributions based on Ubuntu 18.04 and later: bash Copy code distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list Install the NVIDIA Docker toolkit: bash Copy code sudo apt-get update sudo apt-get install -y nvidia-docker2 Restart Docker: bash Copy code sudo systemctl restart docker