Here is the original nvidia-container-toolkit.list
from GitHub
:
https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list
deb https://nvidia.github.io/libnvidia-container/stable/deb/$(ARCH) /
#deb https://nvidia.github.io/libnvidia-container/experimental/deb/$(ARCH) /
Here is the document from Nvidia:
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
I have tried to add the "signed-by
" manually, and then replace the "$(ARCH)
" with "amd64
" or " amd64
":
deb [signed-by=/usr/share/keyrings/nvidia.gpg] https://nvidia.github.io/libnvidia-container/stable/deb/amd64 /
or
deb [signed-by=/usr/share/keyrings/nvidia.gpg] https://nvidia.github.io/libnvidia-container/stable/deb/ amd64 /
But the "apt-get update
" failed with the following error:
E: Malformed line 1 in source list /etc/apt/sources.list.d/nvidia-container-toolkit.list (type)
E: The list of sources could not be read.
Here is the echo $(ARCH)
in Ubuntu:
# echo $(ARCH)
ARCH: command not found
What's the correct form of "nvidia-container-toolkit.list
"?
Update:
If I did not replace the $(ARCH)
, the error is still the same. I think the original nvidia document is wrong.
Update 2:
The problem may relate to the "$(ARCH)", what's $(ARCH) in the nvidia?
Their script is broken. I ran the curl script above, and it indeed made a broken sources.list file. So I corrected it, and an
apt update
now works: