我是靠谱客的博主 酷炫纸飞机,最近开发中收集的这篇文章主要介绍install cuda in a new Ubuntu 20.4 LTS for Geforce rtx 2080TiInstall cuda 11.6.2Install cudnn 8.4.0.27,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

Install cuda 11.6.2

 1. download cuda 11.6.2

CUDA Toolkit Archive | NVIDIA Developer

2. install cuda toolkits

reference to Installation Guide Linux :: CUDA Toolkit Documentationhttps://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

    1   sudo apt-get --purge remove "*cublas*" "*cufft*" "*curand*" 
 "*cusolver*" "*cusparse*" "*npp*" "*nvjpeg*" "cuda*" "nsight*" "*nvidia*"



       lsmod | grep nouveau
    2  uname -r

    9  sudo cp /etc/apt/sources.list /etc/apt/sources.list.backupLL

   11  sudo gedit /etc/apt/sources.list
   12  sudo apt-get update

   14  sudo apt-get install net-tools
   15  ifconfig

   18  sudo apt install vim

   20  sudo vim /etc/modprobe.d/blacklist-nouveau.conf
   21  sudo update-initramfs -u

   23  reboot
   24  ifconfig

   26  sudo ps -e | grep ssh
   27  sudo /etc/init.d/ssh start
   28  sudo apt-get install openssh-server
   29  sudo ps -e | grep ssh
 
   31  mkdir cudaDEB
   32  cd cudaDEB/


   35  gedit installcuda1162.sh 

   37  chmod u+x installcuda1162.sh 

   39  gedit installcuda1162.sh 

   41  cd cudaDEB/

   44  ./installcuda1162.sh 
   45  ls
   46  cd cudaDEB/
#copy the .deb fom windows that is downloaded with Thunder
   48  rm cuda-repo-ubuntu2004-11-6-local_11.6.2-510.47.03-1_amd64.deb 
   49  vim installcuda1162.sh 

   52  rm cuda-repo-ubuntu2004-11-6-local_11.6.2-510.47.03-1_amd64.deb 

   58  ./installcuda1162.sh 
   59  sudo reboot

   61  nvidia-smi
   62  nvcc -V
   63  ls
   64  ls /usr/local/cuda/bin/
   65  history
   
   
   ##########################
   #installcuda1162.sh 
   ##########################
   
 sudo lsmod | grep nouveau
 sudo service lightdm stop
 sudo service gdm stop
 wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin 
 sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 
# wget https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda-repo-ubuntu2004-11-6-local_11.6.2-510.47.03-1_amd64.deb 
 sudo dpkg -i cuda-repo-ubuntu2004-11-6-local_11.6.2-510.47.03-1_amd64.deb 
 sudo apt-key add /var/cuda-repo-ubuntu2004-11-6-local/7fa2af80.pub 
 sudo apt-get update 
 sudo apt-get -y install cuda

  ###########################
  
  
  ##############################
  # blacklist-nouveau.conf
  ##############################
  blacklist nouveau
  options nouveau modeset=0
  #######################################
  
  
  
  Install cudnn following:

Install cudnn 8.4.0.27

1. download cudnn....deb 

download  from  https://developer.nvidia.com/rdp/cudnn-downloadhttps://developer.nvidia.com/rdp/cudnn-download

2. install cudnn from .deb

reference:    Installation Guide :: NVIDIA Deep Learning cuDNN Documentation

command record:

  483  mv cudnn-local-repo-ubuntu2004-8.4.0.27_1.0-1_amd64.deb  ./cudnnDeb/

  485  cd cudnnDeb/
  486  ls
  487  sudo dpkg -i cudnn-local-repo-ubuntu2004-8.4.0.27_1.0-1_amd64.deb

  489  ls /var/cudnn-local-repo-ubuntu2004-8.4.0.27/

  491  sudo apt-key add /var/cudnn-local-repo-ubuntu2004-8.4.0.27/7fa2af80.pub

  493  ls /var/cudnn-local-repo-ubuntu2004-8.4.0.27/7fa2af80.pub  -all
  494  cat /var/cudnn-local-repo-ubuntu2004-8.4.0.27/7fa2af80.pub
  495  sudo apt-get update
  496  ls /var/cudnn-local-repo-ubuntu2004-8.4.0.27/
  497  sudo apt-get install libcudnn8=8.4.0.27-1+cuda11.6
  498  sudo apt-get install libcudnn8-dev=8.4.0.27-1+cuda11.6
  499  sudo apt-get install libcudnn8-samples=8.4.0.27-1+cuda11.6

  501  ls /var/cudnn-local-repo-ubuntu2004-8.4.0.27/
 
  508  cd ex/

  510  mkdir cudnnEx
  511  cd cudnnEx/

  513  cp -r /usr/src/cudnn_samples_v8/ ./
  514  ls
  515  cd cudnn_samples_v8/
  516  ls

  521  cd mnistCUDNN/
  522  ls
  523  make clean && make
  524  ls
  525  sudo apt-get install libfreeimage-dev && sudo apt-get install libfreeimage
  526  make clean && make

  528  ./mnistCUDNN
  

最后

以上就是酷炫纸飞机为你收集整理的install cuda in a new Ubuntu 20.4 LTS for Geforce rtx 2080TiInstall cuda 11.6.2Install cudnn 8.4.0.27的全部内容,希望文章能够帮你解决install cuda in a new Ubuntu 20.4 LTS for Geforce rtx 2080TiInstall cuda 11.6.2Install cudnn 8.4.0.27所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(39)

评论列表共有 0 条评论

立即
投稿
返回
顶部