Outils pour utilisateurs

Outils du site


archives:archive_installation_de_cuda_et_cudnn_sur_un_portable_optimus_avec_debian_9_stretch

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
installation_de_cuda_et_cudnn_sur_un_portable_optimus_avec_debian_9_stretch [2019/03/23 07:57] sergearchives:archive_installation_de_cuda_et_cudnn_sur_un_portable_optimus_avec_debian_9_stretch [2020/04/06 16:07] (Version actuelle) – [Version sur Debian GNU/Linux Version 9 (stretch) 64-bit abandonnée] serge
Ligne 1: Ligne 1:
-====== Installation de CUDA et CUDNN sur un portable optimus avec debian 9 stretch ====== +====== Archive Installation de CUDA et CUDNN sur un portable optimus avec debian 9 stretch et ubuntu 18.04====== 
-**Le but était de compiler YOLO Darknet.**+ 
 +=====Installation de Anaconda CUDA CUDNN sur ubuntu 18.04===== 
 +====Avec Anaconda: mauvaise idée==== 
 +  * **[[https://gist.github.com/mari-linhares/cef4cb3440408e44963d1447a7db5ae0|Setting up a MSI laptop with GPU]] Installation de Ubuntu 18.04, CUDA, CDNN, Pytorch et TensorFlow**  Ce tuto va permettre d'installer et de vérifier "facilement" le bon fonctionnement du GPU. 
 +===Conda=== 
 +  wget -c https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh 
 +  sh Anaconda3-2018.12-Linux-x86_64.sh 
 +===CUDA=== 
 +<code> 
 +wget -c https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39_1.0-1_amd64.deb 
 +sudo dpkg -i cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39_1.0-1_amd64.deb 
 +sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub 
 +sudo apt-key add /var/cuda-repo-10-1-local-10.1.105-418.39/7fa2af80.pub 
 +sudo apt-get update 
 +sudo apt-get install cuda 
 +</code> 
 +===CUDNN=== 
 +Remarque: Début des essais avec 
 +  sudo dpkg -i libcudnn7_7.5.0.56-1+cuda10.1_amd64.deb 
 +qui n'a pas installer cudnn !! 
 + 
 +Il faut avoir un compte sur Nvidia et se loguer pour pouvoir télécharger: 
 +  wget -c https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.5.0.56/prod/10.1_20190225/cudnn-10.1-linux-x64-v7.5.0.56.tgz 
 + 
 +Décompresser, dans le dossier: 
 +  sudo cp -P /media/data/cuda/targets/ppc64le-linux/lib/libcudnn* /usr/local/cuda-10.1/lib64/ 
 +  sudo cp  /media/data/cuda/targets/ppc64le-linux/include/cudnn.h /usr/local/cuda-10.1/include/ 
 +  sudo chmod a+r /usr/local/cuda-10.1/include/cudnn.h /usr/local/cuda/lib64/libcudnn* 
 + 
 +===Installation de Pytorch=== 
 +<code> 
 +# creation d'un environement virtuel conda 
 +conda create -n torch python=3.7 
 +# installation torch pour cuda 10 
 +conda install -y pytorch=0.4 torchvision cuda100 -c pytorch 
 +# test gpu install 
 +</code> 
 +<code python> 
 +python3 -c 'import torch; print(torch.rand(2,3).cuda())' 
 +</code> 
 +<code> 
 +__init__.py:116: UserWarning:  
 +    Found GPU0 GeForce GTX 765M which is of cuda capability 3.0. 
 +    PyTorch no longer supports this GPU because it is too old. 
 +  warnings.warn(old_gpu_warn % (d, name, major, capability[1])) 
 +tensor([[0.6618, 0.3247, 0.4543], 
 +        [0.9745, 0.8508, 0.0141]], device='cuda:0'
 +</code> 
 +Ma carte n'est plus toute fraîche ! 
 +===Installation de TensorFlow=== 
 +<code> 
 +sudo apt-get install libcupti-dev 
 +sudo pip3 install tensorflow-gpu 
 +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64 
 +python3 -c 'from tensorflow.python.client import device_lib; device_lib.list_local_devices()' 
 +</code>
  
 =====Version sur Debian GNU/Linux Version 9 (stretch) 64-bit abandonnée===== =====Version sur Debian GNU/Linux Version 9 (stretch) 64-bit abandonnée=====
-Debian GNU/Linux Version 9 (stretch) 64-bit+**Le but était de compiler YOLO Darknet.** 
 +Nous avons installé Bumblebee et bbswitch. Cela ne permet pas d'avoir la carte Nvidia en permanence. 
  
 **CMake >= 3.8 for modern CUDA support**\\ **CMake >= 3.8 for modern CUDA support**\\
Ligne 37: Ligne 93:
 https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#installlinux-tar\\ https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#installlinux-tar\\
 Téléchargement et installation de libcudnn7_7.4.2.24-1+cuda10.0_amd64.deb  Téléchargement et installation de libcudnn7_7.4.2.24-1+cuda10.0_amd64.deb 
-Il faut obligatoirement avoir un compte Nvidia et se loguer.\\ +Il faut obligatoirement avoir un compte Nvidia et se loguer. 
-https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/libcudnn7-dev_7.4.2.24-1+cuda10.0_amd64.deb\\ +  * [[https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/libcudnn7-dev_7.4.2.24-1+cuda10.0_amd64.deb|libcudnn7-dev_7.4.2.24-1+cuda10.0_amd64.deb]] 
-ou ??\\ +ou ?? 
-https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/libcudnn7_7.4.2.24-1+cuda10.0_amd64.deb\\+  * [[https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/libcudnn7_7.4.2.24-1+cuda10.0_amd64.deb|libcudnn7_7.4.2.24-1+cuda10.0_amd64.deb]]
 Téléchargement et décompression de cudnn-10.0-linux-ppc64le-v7.4.2.24.tgz Téléchargement et décompression de cudnn-10.0-linux-ppc64le-v7.4.2.24.tgz
  
Ligne 60: Ligne 116:
   make   make
      
-{{tag>archive}}+{{tag>archive sb}}
archives/archive_installation_de_cuda_et_cudnn_sur_un_portable_optimus_avec_debian_9_stretch.1553327875.txt.gz · Dernière modification : 2019/03/23 07:57 de serge