輸入 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。
解決:
配置環境如下:
GPU : NVIDIA GeForce GTX 1050 with Max-Q Design
nvidia driver : 511.79-notebook-win10-win11-64bit-international-dch-whql
Windows 10 專業版 : 版本號 21H2, 操作系統內部版本 19044.1586 (更新到最新版后,一定要去設置里點系統更新並重啟!)
(win10升級到21H2可以用官方工具win10易升)
WSL2 Linux 內核 : 5.10.74.3
參考
WSL 1-->2
https://docs.microsoft.com/zh-cn/windows/wsl/install
wsl --set-version 2
在 WSL 2 上啟用 NVIDIA
https://docs.microsoft.com/en-us/windows/ai/directml/gpu-cuda-in-wsl
WSL2 GPU 修復
https://blog.zackzhou.com/win10-docker-wsl2-gpu
WSL docker安裝
https://zhuanlan.zhihu.com/p/148511634
WSL2遷移方法
https://blog.csdn.net/zhys2007/article/details/110958577
WSL2-Linux-Kernel所有版本
https://github.com/microsoft/WSL2-Linux-Kernel/tags