广州网站建设哪家好,网站建立定位企划,国外网络推广服务,百度域名提交收录网址文章目录 cuda 安装安装过程中会要求选择安装的内容更改cuda地址到你安装的地方 cuda 安装
cuda官网寻找cuda11.3 版本
https://developer.nvidia.com/cuda-11.3.0-download-archive?target_osLinuxtarget_archx86_64DistributionUbuntutarget_version20.04Linuxtarget_archx86_64DistributionUbuntutarget_version20.04target_typerunfile_local 下载runfile 版本
wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux.run
sudo sh cuda_11.3.0_465.19.01_linux.run
如果你遇到了 Failed to verify gcc version. See log at /var/log/cuda-installer.log for details. 那么你要重新安装gcc版本
安装特定版本的 GCC例如 9.x 版本
sudo apt install gcc-9 g-9将系统默认的 GCC 版本切换到新安装的版本
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
sudo update-alternatives --install /usr/bin/g g /usr/bin/g-9 90安装过程中会要求选择安装的内容
continueacceptCUDA Toolkit必选Driver如果安装了更高版本的NVIDIA驱动可以不选可以从这里NVIDIA驱动下载下载安装Demo, Sample, Doc都可以不选
更改cuda地址到你安装的地方
vim ~/.bashrccustom path (例/usr/local/cuda-10.2/bin)
export PATH/custom/cuda/bin:$PATH
export LD_LIBRARY_PATH/custom/cuda/lib64:$LD_LIBRARY_PATH修改后保存运行文件
source ~/.bashrc查看环境
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Mar_21_19:15:46_PDT_2021
Cuda compilation tools, release 11.3, V11.3.58
Build cuda_11.3.r11.3/compiler.29745058_0