WSL2 Ubuntu下检测 不到GPU驱动,无法使用GPU

环境:

Win10专业版19041

WSL2

Ubuntu-22.04

问题描述:

WSL2 Ubuntu下检测 不到GPU驱动,无法使用GPU

nvidia-smi

SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
root@02207261848:~# nvidia-smi
Failed to initialize NVML: GPU access blocked by the operating system
Failed to properly shut down NVML: GPU access blocked by the operating system

解决方案:

1.在cmd下面执行

    wsl.exe -d Ubuntu-22.04 --shutdown
    wsl.exe --terminate Ubuntu-22.04

2.添加环境变量<

你可能感兴趣的:(疑难杂症专题,ubuntu,linux,运维)