Outils pour utilisateurs

Outils du site


archives:archive_d_installation_de_cuda_sur_debian_11

Archive d'installation de CUDA sur Debian 11

Toute la suite ne sert à rien

Quel driver possible pour votre carte graphique

sudo apt -y install nvidia-detect
nvidia-detect

GeForce GTX 850M

Detected NVIDIA GPUs:
01:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 850M] [10de:1391] (rev a2)
 
Checking card:  NVIDIA Corporation GM107M [GeForce GTX 850M] (rev a2)
Your card is supported by all driver versions.
Your card is also supported by the Tesla 460 drivers series.
Your card is also supported by the Tesla 450 drivers series.
Your card is also supported by the Tesla 418 drivers series.
It is recommended to install the
    nvidia-driver
package.

GeForce GTX 1060

Detected NVIDIA GPUs:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1060 6GB] [10de:1b83] (rev a1)
 
Checking card:  NVIDIA Corporation GP104 [GeForce GTX 1060 6GB] (rev a1)
Your card is only supported up to the 390 legacy drivers series.
Your card is also supported by the Tesla 440 drivers series.
Your card is also supported by the Tesla 418 drivers series.
It is recommended to install the
    nvidia-legacy-390xx-driver
package.

Installation numéro 11

Installation du driver NVIDIA avec les dépôts Debian

sudo apt install nvidia-driver
sudo systemctl reboot

Installation du driver NVIDIA avec les paquets officiels nvidia.com

Récupération du driver dans les archives nvidia.com

Je choisis de télécharger le driver Latest Legacy GPU version (460.xx series)

sudo apt -y install linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config
 
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
# Ajouter
blacklist nouveau
options nouveau modeset=0
# Save Quit
 
sudo update-initramfs -u
sudo systemctl set-default multi-user.target
sudo systemctl reboot
# Se logguer dans le terminal
sh NVIDIA-Linux-x86_64-460.91.03.run
systemctl set-default graphical.target
systemctl reboot

Nvidia Settings

Dans les 2 cas nvidia-settings n'a pas les infos habituelles.

Ressources

Recherches

L'installation de CUDA au paragraphe suivant affiche une alerte comme quoi ce qui a été installé avant ne va pas.
A confirmer sur une prochaine install propre, et virer ce paragraphe si c'est confimé.

# Téléchargement dans le home de l'installeur
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/495.29.05/NVIDIA-Linux-x86_64-495.29.05.run
 
sudo apt install linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config -y
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
 
# Ajouter ça:
blacklist nouveau
options nouveau modeset=0
# Enregister quitter
 
sudo update-initramfs -u
# Pour être en terminal au redémarrage: This will disable the GUI user after reboot:
sudo systemctl set-default multi-user.target
sudo reboot now
 
# Dans la console, se logger
sudo bash NVIDIA-Linux-x86_64-495.29.05.run 
 
# Quand c'est fini
startx
 
# Pour ne plus être en terminal au redémarrage
sudo systemctl set-default graphical.target
sudo reboot now

Sélection du driver

sudo apt install primus
prime-select

CUDA

wget https://developer.download.nvidia.com/compute/cuda/11.5.1/local_installers/cuda-repo-debian11-11-5-local_11.5.1-495.29.05-1_amd64.deb
sudo dpkg -i cuda-repo-debian11-11-5-local_11.5.1-495.29.05-1_amd64.deb
sudo apt-key add /var/cuda-repo-debian11-11-5-local/7fa2af80.pub
sudo apt update
sudo apt install cuda

Tensorflow with GPU

source mon_env/bin/activate
python3 -m pip install tensorflow-gpu

CuDNN

Télécharger CuDNN à developer.nvidia.com cudnn-archive. Les dev sont nécessaires pour une compilation.
Pour pouvoir télécharger, il faut s'inscrire sur le site Nvidia et monter Pattes Blanches…

Exemple:

sudo dpkg -i libcudnn8_8.3.0.98-1+cuda11.5_amd64.deb
sudo dpkg -i libcudnn8-dev_8.3.0.98-1+cuda11.5_amd64.deb

OpenCV

wget -O opencv.zip https://github.com/opencv/opencv/archive/4.5.3.zip
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.5.3.zip
archives/archive_d_installation_de_cuda_sur_debian_11.txt · Dernière modification : 2021/12/15 20:13 de serge