汉爱手表官方网站,药品和医疗器械网站icp备案前置审批流程,网页制作公司有哪些职位,公司网站如何被百度收录文章目录 下载CUDA安装,以cuda11.6为例运行.run文件安装选项配置环境变量查看cuda版本重启计算机 卸载cuda deepinV23 Beta3对应的debian版本是12#xff1a; bookworm指的是debian12#xff0c;
sid代表不稳定版。 下载CUDA
官网#xff1a;https://developer.nvidia.com… 文章目录 下载CUDA安装,以cuda11.6为例运行.run文件安装选项配置环境变量查看cuda版本重启计算机 卸载cuda deepinV23 Beta3对应的debian版本是12 bookworm指的是debian12
sid代表不稳定版。 下载CUDA
官网https://developer.nvidia.com/cuda-toolkit-archive
方法1下载支持debian12的CUDA版本如CUDA12.3。
方法2下载支持debian11的CUDA版本如CUDA11.6下载.run文件runfile。 示例
wget https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run安装,以cuda11.6为例
运行.run文件
安装cuda11.6由于gcc版本不支持要使用参数--override
sudo sh cuda_11.6.2_510.47.03_linux.run --overridevim查看文件/var/log/cuda-installer.log 报错[ERROR] GCC版本不兼容要是想忽略这个问题请使用--override参数 /var/log/cuda-installer.log日志文件
[INFO]: Driver not installed.
[INFO]: Checking compiler version...
[INFO]: gcc location: /usr/bin/gcc[INFO]: gcc version: gcc version 13.2.0 (Deepin 13.2.0-3deepin)[ERROR]: unsupported compiler version: 13.2.0. Use --override to override this check. 安装选项
输入acceptenter回车 已经安装好Nvidia显卡驱动了就取消安装Driver将X号改为空选择Installenter回车 安装完成输出的提示信息要配置环境变量PATH 和 LD_LIBRARY_PATH
jyujyu-PC:~/Downloads$ sudo sh cuda_11.6.2_510.47.03_linux.run --overrideSummary
Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-11.6/Please make sure that- PATH includes /usr/local/cuda-11.6/bin- LD_LIBRARY_PATH includes /usr/local/cuda-11.6/lib64, or, add /usr/local/cuda-11.6/lib64 to /etc/ld.so.conf and run ldconfig as rootTo uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-11.6/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 510.00 is required for CUDA 11.6 functionality to work.
To install the driver using this installer, run the following command, replacing CudaInstaller with the name of this run file:sudo CudaInstaller.run --silent --driverLogfile is /var/log/cuda-installer.log
jyujyu-PC:~/Downloads$配置环境变量
配置环境变量的方法有多种以用户目录下的~/.bashrc为例。 编辑~/.bashrc文件
# 推荐
vim ~/.bashrc在最下面输入
export PATH$PATH:/usr/local/cuda-11.6/bin
export LD_LIBRARY_PATH$LD_LIBRARY_PATH:/usr/local/cuda-11.6/lib64:wq保存退出
使环境变量临时生效
source ~/.bashrc查看cuda版本
# 不配置环境变量系统找不到nvcc命令
nvcc -V
或
nvcc --version查看cuda版本的其他方法
# 不同系统不一样有的是version.json有的是version.txt
cat /usr/local/cuda/version.json
cat /usr/local/cuda/version.txt/usr/local/cuda是/usr/local/cuda-11.6的软链接
重启计算机
重启计算机使环境变量永久生效。 deepinV23 Beta3 不需要重启计算机每次打开新的shell都会读取~/.bashrc文件。
卸载cuda
ubuntu 完全卸载CUDA 此文章也适用于deepin。