Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Cuda 10.2 on Ubuntu 22.04

15 Oct 2022 »

install the nvidia driver for your gpu

https://www.nvidia.com/Download/index.aspx?lang=en-us

Gcc 7

https://askubuntu.com/questions/1406962/install-gcc7-on-ubuntu-22-04

add to /etc/apt/sources.list deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe

apt update

apt install g++-7

Blacklist nouveau

https://linuxconfig.org/how-to-disable-blacklist-nouveau-nvidia-driver-on-ubuntu-20-04-focal-fossa-linux

$ cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nouveau
options nouveau modeset=0

update-initramfs -u

reboot

Install cuda.run

install cuda 10-2

https://askubuntu.com/questions/1077061/how-do-i-install-nvidia-and-cuda-drivers-into-ubuntu/1077063#1077063

sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'

sudo apt -o Acquire::AllowInsecureRepositories=true \
-o Acquire::AllowDowngradeToInsecureRepositories=true \
update
sudo apt -o Acquire::AllowInsecureRepositories=true \
-o Acquire::AllowDowngradeToInsecureRepositories=true \
install -y --allow-unauthenticated cuda-10-2

echo 'export PATH="/usr/local/cuda-10.2/bin/:$PATH"' > /etc/profile.d/cuda10path.sh ln -sf /usr/bin/gcc-7 /usr/local/cuda-10.2/bin/gcc

caveats

asm/kmap_types.h: No such file or directory

bypass gpg

https://askubuntu.com/questions/74345/how-do-i-bypass-ignore-the-gpg-signature-checks-of-apt

sudo apt -o Acquire::AllowInsecureRepositories=true \
-o Acquire::AllowDowngradeToInsecureRepositories=true \
update