lspci | grep -i nvidia
ubuntu-drivers devices
(3)#自动安装驱动(系统会安装自认为适合的驱动)
sudo ubuntu-drivers autoinstall
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt update sudo ubuntu-drivers autoinstall
nvidia-sm
sudo apt install nvidia-cuda-toolkit
sudo gedit ~/.bashrc
在文末加入以下两行代码(找到cuda安装路径,一般为 /usr/local/cuda+版本号):
export PATH=/usr/local/cuda-<version>/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
(3)初始化:
source ~/.bashr
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.12 /root/anaconda3/envs/yolov8-magic/lib/python3.8/site-packages/torch/lib/../../nvidia/cusparse/lib/libcusparse.so.12
本文链接:https://blog.runxinyun.com/post/232.html 转载需授权!
留言0