LoginSignup
6
6

More than 1 year has passed since last update.

Ubuntu 20.04 RTX 3090 cuda cuDNN driver インストール備忘録

Last updated at Posted at 2021-01-11

Ubuntu 20.04 RTX 3090 cuda cuDNN driver インストールの備忘録です。

2022/6/5 Docker Ver https://qiita.com/Hachimaki/items/5e7b1245bb15cef5bf9a メモ作りました。

#実施した手順
 1) PytorchのHPで、cudaのVersionチェック →cuda 11.0にした。

 2) nouveauを無効化
/etc/modprobe.d/blacklist-nouveau.conf をつくって、
  blacklist nouveau
  options nouveau modeset=0 を書く。

  sudo update-initramfs -u
  sudo reboot
  で適用

 3) cuda Toolkit 11.0 を サイトにしたがってインストール
  ただし、最後
   sudo apt-get -y install cuda
   は、
   sudo apt-get -y install cuda-11-0

 4) cuDNNのバージョンをAmpereとcuda11.0から 8.05にした。
 https://docs.nvidia.com/deeplearning/cudnn/support-matrix/index.html

 5) cuDNN8.05 for cuda11.0を サイトからダウンロード
 https://developer.nvidia.com/rdp/cudnn-download

 6) cuDNNをサイトにしたがって、dpkg インストール
 https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-deb

 7) .bashrcにパスを書く
  export PATH="/usr/local/cuda/bin:$PATH"
  export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"

  source ~/.bashrc
で適用する。

 8) 最新のDriverをインストール ここでは、 460
sudo apt install nvidia-driver-460

libnvidiaがじゃましてインストールできないとエラーがでたら、
sudo apt-get purge libnvidia*
で削除。

 9) python で 
   import torch
torch.cuda.is_available()
を入力して、
   True
が出ることを確認

Driver cuda cuDNN 削除

sudo apt-get purge 'nvidia-*'
sudo apt-get purge 'cuda-*'
sudo apt-get purge "libcudnn8*"
sudo apt autoremove
sudo apt update
sudo apt upgrade

その他参考

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6