Outils pour utilisateurs

Outils du site


tech:install_drivers_graphique_proprietaire_nvidia_cuda

Différences

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

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:install_drivers_graphique_proprietaire_nvidia_cuda [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:install_drivers_graphique_proprietaire_nvidia_cuda [2026/06/29 16:24] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Drivers Matériel Privateur}}
 +
 +# Install drivers graphique propriétaire Nvidia CUDA
 +
 +**Procédure d'installation de [logicielle privateur](https://www.gnu.org/proprietary/proprietary.fr.html)**
 +
 +Voir :
 +* https://wiki.debian.org/fr/NvidiaGraphicsDrivers
 +* http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf
 +* [Intel for display, NVIDIA for computing](https://gist.github.com/wangruohui/bc7b9f424e3d5deb0c0b8bba990b1bc5)
 +
 +Voir aussi :
 +* [Easy TensorFlow](https://www.easy-tensorflow.com)
 +* [NVIDIA CUDA® Deep Neural Network library (cuDNN)](https://developer.nvidia.com/cudnn)
 +* [GPU Boost](https://devblogs.nvidia.com/parallelforall/increase-performance-gpu-boost-k80-autoboost/)
 +
 +Pour CUDA voir OpenCL
 +
 +
 +## glxinfo
 +
 +~~~bash
 +glxinfo
 +~~~
 +
 +Les lignes intéressantes du glxinfo sont:
 +direct rendering: Yes
 +OpenGL vendor string: nouveau
 +
 +## Install Drivers + CUDA8 sur Debian Jessie (Debian 8)
 +
 +Install des dépendances
 +~~~bash
 +apt-get update
 +apt-get install build-essential binutils g++ mpich2 libxmu-dev libxi-dev linux-headers-$(uname -r)
 +~~~
 +
 +Install de Cuda
 +~~~bash
 +cp *.run /root/
 +cd /root/
 +./cuda_8.0.44_linux.run
 +~~~
 +
 +~~~bash
 +export PATH=$PATH:/usr/local/cuda/bin/
 +echo "export PATH=$PATH:/usr/local/cuda/bin" >> ~/.bashrc
 +
 +#export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH
 +echo "/usr/local/cuda/lib64" > /etc/ld.so.conf.d/cuda.conf
 +ldconfig
 +~~~
 +
 +Redémarrage, car le drivers Libre est encore chargé
 +~~~bash
 +lsmod | grep nouveau
 +reboot
 +~~~
 +
 +Le driver Libre **nouveau** n'est plus chargé
 +~~~bash
 +lsmod | grep nouveau
 +~~~
 +
 +Grâce à `/etc/modprobe.d/nvidia-installer-disable-nouveau.conf`
 +
 +`/etc/modprobe.d/nvidia-installer-disable-nouveau.conf`
 +~~~
 +# generated by nvidia-installer
 +blacklist nouveau
 +options nouveau modeset=0
 +~~~
 +
 +~~~bash
 +sudo update-initramfs -u
 +~~~
 +
 +Install des derniers drivers
 +~~~bash
 +systemctl stop gdm
 +./NVIDIA-Linux-x86_64-375.20.run
 +~~~
 +
 +On redémarre
 +~~~bash
 +reboot
 +~~~
 +
 +
 +## Install de Cuda Docker
 +
 +l faut désinstaller tous les paquets Debian cuda et nvidia :
 +
 +~~~bash
 +#apt-get purge $(dpkg -l | egrep 'cuda|nvidia' | grep ^ii | awk '{print $2}')
 +apt purge 'nvidia-*'
 +~~~
 +
 +Install de CUDA
 +~~~bash
 +./cuda_9.2.88_396.26_linux.run
 +./cuda_9.2.88.1_linux.run # Patch nvidia
 +~~~
 +
 +~~~bash
 +echo 'export PATH=$PATH:/usr/local/cuda/bin' | sudo tee /etc/profile.d/cuda.sh
 +echo "/usr/local/cuda/lib64" | sudo tee /etc/ld.so.conf.d/cuda.conf
 +sudo ldconfig
 +~~~
 +
 +`/etc/apt/sources.list.d/nvidia-docker.list`
 +~~~
 +deb https://nvidia.github.io/libnvidia-container/debian9/$(ARCH) /
 +deb https://nvidia.github.io/nvidia-container-runtime/debian9/$(ARCH) /
 +deb https://nvidia.github.io/nvidia-docker/debian9/$(ARCH) /
 +~~~
 +
 +Installer nvidia-docker2
 +~~~bash
 +sudo apt-get update
 +sudo apt-get install nvidia-docker2
 +~~~
 +
 +~~~bash
 +nvidia-docker run -it -p 8888:8888 tensorflow/tensorflow:latest-gpu
 +~~~
 +
 +
 +## Vérif
 +
 +On vérif que le driver en chargé
 +~~~bash
 +lsmod | grep nvidia
 +~~~
 +
 +
 +~~~bash
 +nvidia-smi && echo OK
 +nvidia-smi topo -m
 +nvcc --version
 +~~~
 +
 +~~~bash
 +sudo apt-get install clinfo
 +clinfo
 +~~~
 +
 +~~~bash
 +sudo apt-get install pyrit
 +pyrit list_cores
 +~~~
 +
 +~~~bash
 +cat /proc/driver/nvidia/version
 +~~~
 +
 +~~~
 +NVRM version: NVIDIA UNIX x86_64 Kernel Module  375.20  Tue Nov 15 16:49:10 PST 2016
 +GCC version:  gcc version 4.9.2 (Debian 4.9.2-10)
 +~~~
 +
 +En root
 +~~~bash
 +cd /usr/local/cuda/samples/1_Utilities/deviceQuery
 +make
 +./deviceQuery
 +~~~
 +
 +~~~bash
 +cd /usr/local/cuda/samples/1_Utilities/bandwidthTest
 +make
 +/usr/local/cuda/samples/bin/x86_64/linux/release/bandwidthTest
 +~~~
 +
 +
 +## cudnn
 +
 +### Install
 +
 +Voir :
 +* https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html
 +* https://www.easy-tensorflow.com/tf-tutorials/install/cuda-cudnn
 +
 +
 +Unzip the cuDNN package.
 +~~~bash
 +tar -xzvf cudnn-10.2-linux-x64-v7.6.5.32.tgz
 +~~~
 +
 +Copy the following files into the CUDA Toolkit directory, and change the file permissions.
 +~~~bash
 +sudo cp cuda/include/cudnn.h /usr/local/cuda/include
 +sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
 +sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
 +~~~
 +
 +Needed ?
 +~~~bash
 +sudo apt-get install libcupti-dev 
 +~~~
 +
 +ou 
 +
 +~~~bash
 +# the runtime library
 +sudo dpkg -i libcudnn7_7.0.5.15–1+cuda9.0_amd64.deb
 +
 +# the developer library
 +sudo dpkg -i libcudnn7-dev_7.0.5.15–1+cuda9.0_amd64.deb
 +
 +# the code samples
 +sudo dpkg -i libcudnn7-doc_7.0.5.15–1+cuda9.0_amd64.deb
 +~~~
 +
 +
 +#### Autres
 +
 +
 +`~/.bashrc`
 +~~~bash
 +# put the following line in the end or your .bashrc file
 +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64"
 +~~~
 +
 +~~~bash
 +sudo ldconfig
 +~~~
 +
 +
 +### Test 
 +
 +Voir : http://www.robot.t.u-tokyo.ac.jp/~miyagusuku/deeplearning,/install/2018/10/01/dlbox_install.html
 +
 +
 +
 +~~~bash
 +cp -r /usr/src/cudnn_samples_v7/ ~
 +cd ~/cudnn_samples_v7/mnistCUDNN
 +make clean && make
 +./mnistCUDNN
 +~~~
 +
 +
 +## Autres
 +
 +~~~bash
 +cd /usr/local/cuda/samples/5_Simulations/nbody
 +make
 +GLPATH=/usr/lib make
 +GLPATH=/usr/lib/x86_64-linux-gnu make
 +./nbody -benchmark -numbodies=256000 -device=0
 +
 +apt-get install gcc g++ gcc-4.8 g++-4.8 gcc-4.9 g++-4.9 libxi6 libxi-dev libglu1-mesa libglu1-mesa-dev libxmu6 linux-headers-amd64 linux-source freeglut3-dev
 +~~~
 +Voir https://andrewbolster.info/2016/04/fixcuda-on-debian-jessie
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki