NVIDIA/nvidia-container-runtime

[Warning] apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

mokshmridul opened this issue · 8 comments

While installing on Ubuntu 22.04 LTS, using the following instructions:

curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add -

The following message pops up

apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

Request if someone could please help me with an alternative to this, and we could also update the install guide, since apt-key is depreciated

So i did a fair bit of googling on the issue, and was wondering if the following could be a reasonable solution

sudo apt-key export F796ECB0 | sudo gpg --dearmour -o /usr/share/keyrings/nvidia-container-runtime.gpg

echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/nvidia-container-runtime.gpg] https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/$(ARCH) /' > /etc/apt/sources.list.d/nvidia-container-runtime.list

sudo apt-key del F796ECB0

or is there a better way?

The easiest solution that works for me is

wget https://nvidia.github.io/nvidia-container-runtime/gpgkey -O /etc/apt/trusted.gpg.d/nvidia-container-runtime.asc

As apt will just read any key in that folder, removing the need to edit the sources list

The easiest solution that works for me is

wget https://nvidia.github.io/nvidia-container-runtime/gpgkey -O /etc/apt/trusted.gpg.d/nvidia-container-runtime.asc

As apt will just read any key in that folder, removing the need to edit the sources list

Ahh okay, i think thats a great solution too. I guess this can be closed out in that case. Thanks.

What instructions were you following?

We updated our installation instructions 2 weeks ago to detail a new procedure since apt-key is now deprectated:
https://gitlab.com/nvidia/cloud-native/cnt-docs/-/merge_requests/99

There's multiple places with the old instructions that Google will give you very high up and point to nvidia official docs, such as
https://docs.nvidia.com/ai-enterprise/deployment-guide/dg-docker.html
https://nvidia.github.io/nvidia-docker/

Thanks @Doridian. We will update more of the docs on our end.

What instructions were you following?

We updated our installation instructions 2 weeks ago to detail a new procedure since apt-key is now deprectated: https://gitlab.com/nvidia/cloud-native/cnt-docs/-/merge_requests/99

I was following the following instructions, cant seem to recall where i got them from though:

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update && sudo apt-get install nvidia-container-runtime -y

Edit Note: My instructions provide for an install of "nvidia-container-runtime", but the link provided by you are for installing "nvidia-container-toolkit". Sorry for the stupid question, but are these interchangeable?

zgjja commented

https://docs.nvidia.com/ai-enterprise/deployment-guide-vmware/0.1.0/docker.html

also in this site, it is still using the 'apt-key' in doc.