报错信息:
Command 'nvidia-smi' not found, but can be installed with:
sudo apt install nvidia-utils-390 # version 390.157-0ubuntu0.22.04.2, or
sudo apt install nvidia-utils-418-server # version 418.226.00-0ubuntu5~0.22.04.1
sudo apt install nvidia-utils-450-server # version 450.248.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470 # version 470.223.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470-server # version 470.223.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-525 # version 525.147.05-0ubuntu0.22.04.1
sudo apt install nvidia-utils-525-server # version 525.147.05-0ubuntu0.22.04.1
sudo apt install nvidia-utils-535 # version 535.129.03-0ubuntu0.22.04.1
sudo apt install nvidia-utils-535-server # version 535.129.03-0ubuntu0.22.04.1
sudo apt install nvidia-utils-510 # version 510.60.02-0ubuntu1
sudo apt install nvidia-utils-510-server # version 510.47.03-0ubuntu3
解决方法:
sudo cp /usr/lib/wsl/lib/nvidia-smi /usr/bin/nvidia-smi
sudo chmod ogu+x /usr/bin/nvidia-smi