Packaging for cuda-keyring
- Install GPG public key in
/usr/share/keyrings/ - Set repository priority with apt pinning
- Enable Nvidia's CUDA repository with
.listforapt-get
deb [signed-by=/path/to/keyring] https://$repositoryURL $suiteex:
debian11/x86_64
deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/ /
https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
- cuda-keyringThe apt-key command is deprecated in Debian 12, Ubuntu 21.10 and derivative distros.
NVIDIA provides the repo GPG keys in both *.pub and encapsulated keyring formats.
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-archive-keyring.gpgOR
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/$shortname.pub
cat $shortname.pub | gpg --dearmor > cuda-archive.keyring.gpgnote: replace
$shortnamewith3bf863cc
Repositories maintained by different organizations may contain packages with the same name.
To ensure apt selects software from one repository over another, priority pinning may be used.
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
mv cuda-ubuntu2204.pin cuda.pincat cuda.pin
Package: nsight-compute
Pin: origin *ubuntu.com*
Pin-Priority: -1
Package: nsight-systems
Pin: origin *ubuntu.com*
Pin-Priority: -1
Package: *
Pin: release l=NVIDIA CUDA
Pin-Priority: 600note: these are only needed for building not installation
apt-get install debhelper devscripts dpkg-dev makeusage: build.sh <keyring.gpg> [priority.pin]
DISTRO=[ubuntu2204|ubuntu2004] ARCH=[x86_64|sbsa|arm64] build.sh
DISTRO=[ubuntu2204|ubuntu2004] ARCH=[cross-linux-sbsa|cross-linux-aarch64] build.sh
DISTRO=[ubuntu1804|ubuntu1604] ARCH=[x86_64|ppc64el|sbsa] build.sh
DISTRO=[debian11|debian10|wsl-ubuntu] ARCH=x86_64 build.shwget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-archive-keyring.gpg
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
mv cuda-ubuntu2204.pin cuda.pinDISTRO=ubuntu2204 ARCH=x86_64 ./build.sh cuda-archive-keyring.gpg cuda.pinls cuda-keyring*_all.deb
sudo dpkg --install cuda-keyring*_all.deb
sudo apt-get updateSee CONTRIBUTING.md