017、Python+fastapi,第一个Python项目走向第17步:ubuntu24.04 无界面服务器版下安装nvidia显卡驱动
新的ubuntu24.04正式版发布了,前段时间玩了下桌面版,感觉还行,先安装一个服务器无界面版本吧安装时有一个openssh选择安装,要不然就不能ssh远程,我就是没选,后来重新安装ssh。另外一个就是安装过程中静态ip设置下在etc/netplan 文件夹下,有一个yaml文件,我的是50-cloud-init.yaml,先用ip a看看network:ethernets:enp3s0:rou
一、说明
新的ubuntu24.04正式版发布了,前段时间玩了下桌面版,感觉还行,先安装一个服务器无界面版本吧
安装时有一个openssh选择安装,要不然就不能ssh远程,我就是没选,后来重新安装ssh。
另外一个就是安装过程中静态ip设置下
在etc/netplan 文件夹下,有一个yaml文件,我的是50-cloud-init.yaml,先用ip a看看
victor@victor:~$ cd /etc/netplan/
victor@victor:/etc/netplan$ ls
50-cloud-init.yaml
network:
ethernets:
enp3s0:
dhcp4: false
addresses: [192.168.1.13/24]
optional: true
routes:
- to: default
via: 192.168.1.1
nameservers:
addresses: [192.168.1.1,8.8.8.8]
version: 2
二、安装nvidia驱动
victor@victor:~$ nvidia-smi
Command 'nvidia-smi' not found, but can be installed with:
sudo apt install nvidia-utils-470 # version 470.223.02-0ubuntu1, or
sudo apt install nvidia-utils-470-server # version 470.223.02-0ubuntu1
sudo apt install nvidia-utils-525 # version 525.147.05-0ubuntu1
sudo apt install nvidia-utils-525-server # version 525.147.05-0ubuntu1
sudo apt install nvidia-utils-535 # version 535.146.02-0ubuntu1
sudo apt install nvidia-utils-535-server # version 535.129.03-0ubuntu1没有证明没安装
victor@victor:~$ ubuntu-drivers devices
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
ERROR:root:aplay command not found
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001B87sv00000000sd00000000bc03sc02i00
vendor : NVIDIA Corporation
model : GP104 [P104-100]
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-470 - distro non-free
driver : nvidia-driver-535-server - distro non-free
driver : nvidia-driver-535 - distro non-free recommended
driver : xserver-xorg-video-nouveau - distro free builtin安装建议的
错误:ERROR:root:could not open aplay -l
sudo apt install alsa-base
victor@victor:~$ sudo apt install nvidia-driver-535
#sudo systemctl set-default graphical.target # 设置为图形界面启动
sudo systemctl set-default multi-user.target # 设置为文本模式启动
victor@victor:~$ nvidia-smi
Tue Apr 30 12:28:58 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.171.04 Driver Version: 535.171.04 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA P104-100 Off | 00000000:01:00.0 Off | N/A |
| 50% 29C P8 11W / 180W | 0MiB / 8192MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------++---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+
安装好了,需要重启才能看到,reboot下
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)