I tried the snippet
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey |
sudo apt-key add -
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
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
But that was giving warning ‘Unsupported distribution!’. Here is the completed log.
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
# Unsupported distribution!
# Check https://nvidia.github.io/nvidia-docker
Get:1 https://download.docker.com/linux/ubuntu noble InRelease [48.8 kB]
Hit:2 https://nvidia.github.io/libnvidia-container/stable/deb/amd64 InRelease
Get:3 https://dl.google.com/linux/chrome/deb stable InRelease [1825 B]
Hit:4 http://archive.ubuntu.com/ubuntu noble InRelease
Get:5 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:7 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1215 B]
Get:8 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:9 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [992 kB]
Get:10 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [748 kB]
Get:11 http://archive.ubuntu.com/ubuntu noble-updates/main Translation-en [219 kB]
Get:12 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1054 kB]
Get:13 http://security.ubuntu.com/ubuntu noble-security/main Translation-en [143 kB]
Get:14 http://archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [266 kB]
Get:15 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [27.1 kB]
Get:16 http://archive.ubuntu.com/ubuntu noble-backports/universe Translation-en [16.5 kB]
Get:17 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [830 kB]
Get:18 http://security.ubuntu.com/ubuntu noble-security/universe Translation-en [181 kB]
Get:19 http://security.ubuntu.com/ubuntu noble-security/restricted Translation-en [175 kB]
Fetched 5082 kB in 4s (1187 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
nvidia-docker2
0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded.
Need to get 5128 B of archives.
After this operation, 21.5 kB of additional disk space will be used.
Get:1 https://nvidia.github.io/libnvidia-container/stable/deb/amd64 nvidia-docker2 2.14.0-1 [5128 B]
Fetched 5128 B in 0s (13.5 kB/s)
Selecting previously unselected package nvidia-docker2.
(Reading database ... 79698 files and directories currently installed.)
Preparing to unpack .../nvidia-docker2_2.14.0-1_all.deb ...
Unpacking nvidia-docker2 (2.14.0-1) ...
Setting up nvidia-docker2 (2.14.0-1) ...
I tried few things instead.
I was using Ubuntu 24 LTS. I downgraded that to Ubuntu 22 LTS and started with new setup.