Outils pour utilisateurs

Outils du site


debian_11_bullseye_et_cuda

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
debian_11_bullseye_et_cuda [2021/12/15 16:34] – [Nvidia Settings] sergedebian_11_bullseye_et_cuda [2022/06/18 11:58] (Version actuelle) – [Debian 11 Bullseye Mate et CUDA] serge
Ligne 1: Ligne 1:
 ====== Debian 11 Bullseye Mate et CUDA ====== ====== Debian 11 Bullseye Mate et CUDA ======
 +<WRAP center round box 60% centeralign>
 +**How to install CUDA on Debian 11 Bullseye**
 +</WRAP>
 +
 +<WRAP center round alert 60%>
 +!!!!!!!!! Ce tuto ne marche pas !!!!!!!!!!!
 +</WRAP>
  
 ===== Installation Préliminaires ===== ===== Installation Préliminaires =====
Ligne 22: Ligne 29:
 </code> </code>
 <code bash> <code bash>
 +sudo dpkg --add-architecture i386
 sudo apt update sudo apt update
 sudo apt upgrade sudo apt upgrade
 sudo apt install mate-menu mate-desktop-environment-extras locales ncdu git gnome-system-tools caja-open-terminal software-properties-common mate-tweak synaptic terminator geany geany-plugins git firmware-iwlwifi firmware-linux-nonfree sudo apt install mate-menu mate-desktop-environment-extras locales ncdu git gnome-system-tools caja-open-terminal software-properties-common mate-tweak synaptic terminator geany geany-plugins git firmware-iwlwifi firmware-linux-nonfree
-sudo dpkg --add-architecture i386 
-sudo apt update 
-sudo apt upgrade 
 </code> </code>
  
-=====Quel driver possible pour votre carte graphique=====+=====Cuda et Driver Nvidia===== 
 +L'installation m'a demandé (on est poli chez Nvidia, c'est pas comme Linus ...) l'autorisation de désinstaller le driver qui avait été installé avant! Il est donc absolument inutile de se casser la tête à installer un driver.
 <code bash> <code bash>
-sudo apt -y install nvidia-detect +sudo apt install nvidia-cuda-toolkit nvidia-cuda-dev 
-nvidia-detect+nvcc --version 
 </code> </code>
-===GeForce GTX 850M=== 
-<code bash> 
-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) +**Certificat de la bonne installation:**
-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. +
-</code> +
- +
-===GeForce GTX 1060===+
 <code bash> <code bash>
-Detected NVIDIA GPUs: +nvcc: NVIDIA (RCuda compiler driver 
-01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1060 6GB] [10de:1b83] (rev a1+Copyright (c) 2005-2021 NVIDIA Corporation 
- +Built on Sun_Feb_14_21:12:58_PST_2021 
-Checking card:  NVIDIA Corporation GP104 [GeForce GTX 1060 6GB] (rev a1) +Cuda compilation tools, release 11.2, V11.2.152 
-Your card is only supported up to the 390 legacy drivers series. +Build cuda_11.2.r11.2/compiler.29618528_0
-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. +
 </code> </code>
-=====Test numéro 11===== +====CuDNN====
-  * https://linuxconfig.org/how-to-install-nvidia-driver-on-debian-10-buster-linux +
-  * **[[https://www.linuxcapable.com/how-to-install-nvidia-495-xx-beta-drivers-on-debian-11-bullseye/|How to Install Nvidia 495.xx Beta Drivers on Debian 11 Bullseye]]** +
-  +
-====Installation du driver NVIDIA avec les dépôts Debian==== +
-<code bash> +
-sudo apt install nvidia-driver +
-sudo systemctl reboot +
-</code> +
- +
- +
-====Installation du driver NVIDIA avec les paquets officiels nvidia.com==== +
-===Récupération du driver dans les archives nvidia.com=== +
-  * https://www.nvidia.com/en-us/drivers/unix/ +
-Je choisis de télécharger le driver Latest Legacy GPU version (460.xx series) +
- +
-<code bash> +
-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 +
-</code> +
- +
-====Nvidia Settings==== +
-Dans les 2 cas nvidia-settings n'a pas les infos habituelles. +
-{{ :media_15:nvidia_settings.png?400 |}} +
- +
-====Cuda==== +
-  sudo apt install nvidia-cuda-toolkit nvidia-cuda-dev +
-  nvcc --version  +
-=====Sélection du driver===== +
-  sudo apt install primus +
-  prime-select +
-=====Ressources===== +
-  * **[[https://www.server-world.info/en/note?os=Debian_11&p=cuda&f=1|Install CUDA 11.2]]** +
- +
-=====Recherche===== +
-====Cette étape est inutile==== +
-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é. +
- +
-<code bash> +
-# 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 +
-</code> +
- +
-====CUDA==== +
- +
-<code bash> +
-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 +
-</code> +
- +
- +
-====Tensorflow with GPU==== +
- +
-  source mon_env/bin/activate +
-  python3 -m pip install tensorflow-gpu +
-   +
-=====CuDNN=====+
 Télécharger CuDNN à [[https://developer.nvidia.com/rdp/cudnn-archive|developer.nvidia.com cudnn-archive]]. Les dev sont nécessaires pour une compilation.\\ Télécharger CuDNN à [[https://developer.nvidia.com/rdp/cudnn-archive|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... Pour pouvoir télécharger, il faut s'inscrire sur le site Nvidia et monter Pattes Blanches...
  
 +Choisir un deb pour Ubuntu 20.04 !
 Exemple: Exemple:
 <code bash> <code bash>
-sudo dpkg -i libcudnn8_8.3.0.98-1+cuda11.5_amd64.deb +sudo dpkg -i libcudnn8_8.1.1.33-1+cuda11.2_amd64.deb 
-sudo dpkg -i libcudnn8-dev_8.3.0.98-1+cuda11.5_amd64.deb+sudo dpkg -i libcudnn8-dev_8.1.1.33-1+cuda11.2_amd64.deb
 </code> </code>
-=====OpenCV===== 
- 
  
-  wget -O opencv.zip https://github.com/opencv/opencv/archive/4.5.3.zip +=====Compilation de OpenCV avec CUDA=====
-  wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.5.3.zip+
  
  
 {{tag> cuda ia linux opencv sb }} {{tag> cuda ia linux opencv sb }}
debian_11_bullseye_et_cuda.1639586072.txt.gz · Dernière modification : 2021/12/15 16:34 de serge