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.
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:56] – créée serge | archives: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 ====== | + | ====== |
- | {{tag> | + | =====Installation de Anaconda CUDA CUDNN sur ubuntu 18.04===== |
+ | ====Avec Anaconda: mauvaise idée==== | ||
+ | * **[[https:// | ||
+ | ===Conda=== | ||
+ | wget -c https:// | ||
+ | sh Anaconda3-2018.12-Linux-x86_64.sh | ||
+ | ===CUDA=== | ||
+ | < | ||
+ | wget -c https:// | ||
+ | sudo dpkg -i cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39_1.0-1_amd64.deb | ||
+ | sudo apt-key add / | ||
+ | sudo apt-key add / | ||
+ | sudo apt-get update | ||
+ | sudo apt-get install cuda | ||
+ | </ | ||
+ | ===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:// | ||
+ | |||
+ | Décompresser, | ||
+ | sudo cp -P / | ||
+ | sudo cp / | ||
+ | sudo chmod a+r / | ||
+ | |||
+ | ===Installation de Pytorch=== | ||
+ | < | ||
+ | # 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 python> | ||
+ | python3 -c ' | ||
+ | </ | ||
+ | < | ||
+ | __init__.py: | ||
+ | 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.9745, 0.8508, 0.0141]], device=' | ||
+ | </ | ||
+ | Ma carte n'est plus toute fraîche ! | ||
+ | ===Installation de TensorFlow=== | ||
+ | < | ||
+ | sudo apt-get install libcupti-dev | ||
+ | sudo pip3 install tensorflow-gpu | ||
+ | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/ | ||
+ | python3 -c 'from tensorflow.python.client import device_lib; device_lib.list_local_devices()' | ||
+ | </ | ||
+ | |||
+ | =====Version sur Debian GNU/Linux Version 9 (stretch) 64-bit abandonnée===== | ||
+ | **Le but était de compiler YOLO Darknet.** | ||
+ | Nous avons installé Bumblebee et bbswitch. Cela ne permet pas d' | ||
+ | |||
+ | **CMake >= 3.8 for modern CUDA support**\\ | ||
+ | https:// | ||
+ | Télécharger [[https:// | ||
+ | ./bootstrap && make && sudo make install | ||
+ | |||
+ | **GCC or Clang**\\ | ||
+ | sudo apt-get install clang | ||
+ | |||
+ | **OpenCV < 4.0**\\ | ||
+ | < | ||
+ | sudo pip3 install opencv-python==3.4.5.20 | ||
+ | # je ratisse large, installe ~ 100 paquets | ||
+ | sudo apt-get install libopencv-core-dev libopencv-highgui-dev libopencv-flann-dev libopencv-photo-dev libopencv-video-dev | ||
+ | # ceci devrait tout appeler | ||
+ | sudo apt-get install libopencv-dev | ||
+ | </ | ||
+ | |||
+ | **CUDA**\\ | ||
+ | CUDA 10.0: [[https:// | ||
+ | |||
+ | sudo apt-get install gcc g++ gcc-4.9 g++-4.9 libxi libxi6 libxi-dev libglu1-mesa libglu1-mesa-dev libxmu6 libxmu6-dev linux-headers-amd64 linux-source | ||
+ | |||
+ | Utilisation de la version ubuntu 18.04 de 2.4 Go ! | ||
+ | wget -c https:// | ||
+ | Installation du driver seul. Mais comme il a été installé avant je pense que cette étape ne sert à rien. | ||
+ | |||
+ | **cuDNN**\\ | ||
+ | cuDNN >= 7.0 for CUDA 10.0 https:// | ||
+ | |||
+ | https:// | ||
+ | https:// | ||
+ | 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. | ||
+ | * [[https:// | ||
+ | ou ?? | ||
+ | * [[https:// | ||
+ | Téléchargement et décompression de cudnn-10.0-linux-ppc64le-v7.4.2.24.tgz | ||
+ | |||
+ | Les chemins sont faux, le faire à la main avec un sudo votre navigateur de fichiers | ||
+ | sudo cp cuda/ | ||
+ | sudo cp cuda/ | ||
+ | Les droits sont juste, ne pas faire: | ||
+ | sudo chmod a+r / | ||
+ | |||
+ | |||
+ | **GPU with CC**\\ | ||
+ | GPU with CC >= 3.0: Dans le [[https:// | ||
+ | |||
+ | **make**\\ | ||
+ | Export nécessaire pour avoir nvcc | ||
+ | export PATH=/ | ||
+ | nvcc -V | ||
+ | export PATH=/ | ||
+ | make | ||
+ | |||
+ | {{tag> |
archives/archive_installation_de_cuda_et_cudnn_sur_un_portable_optimus_avec_debian_9_stretch.1553327764.txt.gz · Dernière modification : 2019/03/23 07:56 de serge