ubuntu20.04安装cuda11.4、cudnn

发布时间:2022-07-02 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了ubuntu20.04安装cuda11.4、cudnn脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

 

1.检查自己脑支持的cuda

lhw@lhw-Dell-G15-5511:~$ nvidia-smi
Wed Oct 20 00:00:21 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-sMI 470.63.01    Driver Version: 470.63.01    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        PErsistence-M| Bus-id        Disp.A | Volatile Uncorr. ECC |
| fan  Temp  Perf  Pwr:usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| N/A   49C    P8    16W /  N/A |    633MiB /  5938MiB |     16%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| PRocesses:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       988      G   /usr/lib/xorg/Xorg                 35MiB |
|    0   N/A  N/A      1586      G   /usr/lib/xorg/Xorg                345MiB |
|    0   N/A  N/A      1724      G   /usr/bin/GNOME-shell               57MiB |
|    0   N/A  N/A    164717      G   ...AAAAAAAAA= --shared-files      144MiB |
|    0   N/A  N/A    164726      G   ...AAAAAAAAA= --shared-files       38MiB |
+-----------------------------------------------------------------------------+

显示支持的cuda版本为11.4

 

2.去nvidia官网下载最新的cuda11.4.2

 

wget https://developer.download.nvidia.COM/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run
sudo sh cuda_11.4.2_470.57.02_linux.run

出来提示后,依次操作

 1.是否接受EULA?   输入accept
 2.cuda安装?   选择不安装驱动,其他默认安装install
 直至安装完成

添加环境变量:

gedit ~/.bashrc

 

 

cuDNN Library for Linux (x86_64)

 

脚本宝典总结

以上是脚本宝典为你收集整理的ubuntu20.04安装cuda11.4、cudnn全部内容,希望文章能够帮你解决ubuntu20.04安装cuda11.4、cudnn所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。