Onela@胡邹不胡诌
_

Ubuntu 22.04 安装 Tesla P100 驱动

May 20, 2024 · 2 min · Ubuntu

禁用 nouveau 驱动

执行 vim /etc/modprobe.d/blacklist.conf, 在文件末尾添加一句 blacklist nouveau 执行 update-initramfs -u并重启 重启电脑后执行 lsmod | grep nouveau,如果没有输出则说明禁用 nouveau 成功

NVIDIA Tesla p100 驱动安装

驱动下载

https://www.nvidia.cn/Download/index.aspx?lang=cn

Data Center / Tesla -> P-Series -> Tesla P100

shell

# 下载
wget https://cn.download.nvidia.com/tesla/550.54.15/NVIDIA-Linux-x86_64-550.54.15.run
# 目录授权
chmod a+x ./NVIDIA-Linux-x86_64-550.54.15.run
# 执行安装
./NVIDIA-Linux-x86_64-550.54.15.run

全部默认选项即可

shell

# 检测是否安装成功
nvidia-smi

cuda 安装

官方驱动下载地址

https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=runfile_local

shell

# 使用wget下载到本地
wget https://developer.download.nvidia.com/compute/cuda/12.5.0/local_installers/cuda_12.5.0_555.42.02_linux.run
chmod a+x cuda_12.5.0_555.42.02_linux.run
 
# 执行安装
./cuda_12.5.0_555.42.02_linux.run

shell

 
===========
= Summary =
===========
 
Driver:   Installed
Toolkit:  Installed in /usr/local/cuda-12.5/
 
Please make sure that
 -   PATH includes /usr/local/cuda-12.5/bin
 -   LD_LIBRARY_PATH includes /usr/local/cuda-12.5/lib64, or, add /usr/local/cuda-12.5/lib64 to /etc/ld.so.conf and run ldconfig as root
 
To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-12.5/bin
To uninstall the NVIDIA Driver, run nvidia-uninstall
Logfile is /var/log/cuda-installer.log

shell

# 打开profile
vim /etc/profile
 
# 末尾追加环境变量
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-12.5/lib64
 
# 配置生效
source  /etc/profile

安装cuda出现gcc错误

Failed to verify gcc version. See log at /var/log/cuda-installer.log for details.

shell

apt install build-essential
Edit this page on GitHub Last updated: 2024/6/5 19:29:11