戴尔新机----ubuntu20.04-----显卡驱动515
打开终端 【sudo ubuntu-drivers devices】
显示如下:
modalias : pci:v000010DEd00002484sv000010DEsd0000146Bbc03sc00i00
vendor : NVIDIA Corporation
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-510 - distro non-free
driver : nvidia-driver-515-open - distro non-free
driver : nvidia-driver-515 - distro non-free
driver : nvidia-driver-525-open - third-party non-free
driver : nvidia-driver-525-server - distro non-free
driver : nvidia-driver-515-server - distro non-free
driver : nvidia-driver-525 - third-party non-free
driver : nvidia-driver-470 - distro non-free recommended
driver : xserver-xorg-video-nouveau - distro free builtin
输入命令【sudo apt install nvidia-driver-515】
重启系统【reboot】
输入命令【nvidia-smi】
显示如下:
NVIDIA-SMI 515.86.01 Driver Version: 515.86.01 CUDA Version: 11.7 |
新机挂在硬盘:
【lsblk】
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 219M 1 loop /snap/gnome-3-34-1804/66
loop1 7:1 0 51M 1 loop /snap/snap-store/518
loop2 7:2 0 64.8M 1 loop /snap/gtk-common-themes/1514
loop3 7:3 0 55.5M 1 loop /snap/core18/1988
loop4 7:4 0 31.1M 1 loop /snap/snapd/11036
sda 8:0 0 931.5G 0 disk
sr0 11:0 1 1024M 0 rom
nvme0n1 259:0 0 238.5G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot/efi
└─nvme0n1p2 259:2 0 238G 0 part /
【sudo fdisk /dev/sda】
根据提示,依次输入:n、p、1、回车、回车、w。
【sudo mkfs.ext4 /dev/sda】
【sudo mkdir /mnt/DEV_ST8000_01】
【sudo mount /dev/sda /mnt/DEV_ST8000_01】
【df -h】
显示如下:
文件系统 容量 已用 可用 已用% 挂载点
udev 16G 0 16G 0% /dev
tmpfs 3.2G 2.6M 3.2G 1% /run
/dev/nvme0n1p2 234G 11G 211G 5% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/loop0 219M 219M 0 100% /snap/gnome-3-34-1804/66
/dev/loop1 52M 52M 0 100% /snap/snap-store/518
/dev/loop2 65M 65M 0 100% /snap/gtk-common-themes/1514
/dev/loop3 56M 56M 0 100% /snap/core18/1988
/dev/loop4 32M 32M 0 100% /snap/snapd/11036
/dev/nvme0n1p1 511M 6.1M 505M 2% /boot/efi
tmpfs 3.2G 20K 3.2G 1% /run/user/125
tmpfs 3.2G 48K 3.2G 1% /run/user/1000
/dev/sda 916G 28K 870G 1% /mnt/DEV_ST8000_01
成功挂在1T的硬盘
安装cuda
官方网站:https://developer.nvidia.com/cuda-downloads
下载对应版本
注意:
可能需要建立软链接,当多个版本的cuda存在时:
如:
(base) root@20C481:/usr/local# ls
bin cuda cuda-11 cuda-11.2 etc games include lib man sbin share src
输入命令:【vim ~/.bashrc 】最后添加
export PATH="/usr/local/cuda-11.5/bin:$PATH" export LD_LIBRARY_PATH="/usr/local/cuda-11.5/lib64:$LD_LIBRARY_PATH"