【WSL2 Win10】解决子系统中nividia-smi出现的Failed to initialize NVML GPU access blocked by the operating systeM
环境:WIN10专业版 WSL2 Ubuntu x64架构尝试在WSL2中装CUDA,装好以后在wsl系统中输入nvidia-smi命令,结果报错。但是在Win10的CMD中正常显示Failed to initialize NVML: GPU access blocked by the operating systemFailed to properly shut down NVML: GPU a
目录
问题描述
环境:WIN10专业版 WSL2 Ubuntu x64架构
cmd中输入nvidia-smi命令正常显示,但在WSL2中装CUDA,装好以后在wsl系统中输入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
在docker中会出现错误:
docker: Error response from daemon: failed to create shim: OCI runtime create faileddocker: Error response from daemon: failed to create shim: OCI runtime create failed
解决方案
在网上搜了一下,没太多类似的情况。后来无意中看见一个博客说是电脑版本问题,导致wsl2一直无法正常链接到GPU
之前看了不少文章对WSL2的要求版本说法不一,再加上我的Win10已经升级了WSL2,就没有考虑这方面的问题
当前系统信息windows10专业版19041,21H2:
利用windows10易升升级到了19044,21H2:
https://www.microsoft.com/zh-cn/software-download/windows10
在cmd里面输入nvidia-smi就好了,如下:
在docker里面输入nvidia-smi就好了,如下:
参考网址
- https://blog.csdn.net/weixin_44121966/article/details/122848667
- https://www.jianshu.com/p/be669d9359e2
- https://www.bilibili.com/read/cv14608547
- https://docs.nvidia.cn/cuda/wsl-user-guide/index.html#ch02-sub03-installing-wsl2
- https://docs.nvidia.com/cuda/wsl-user-guide/index.html#container-runtime-init-errors
- CUDA Toolkit 11.7 Downloads | NVIDIA Developer
- NVIDIA - 驱动下载
- https://docs.nvidia.com/cuda/wsl-user-guide/index.html
- https://zhuanlan.zhihu.com/p/469666491
- https://zhuanlan.zhihu.com/p/408403790
更多推荐
所有评论(0)