Docker WSL2 CUDA支持:标准输出:,标准错误:自动检测模式为“传统”错误

pjngdqdw  于 2022-12-11  发布在  Docker
关注(0)|答案(1)|浏览(172)

因此,我在Windows上运行CUDA 11.8,在Windows中运行nvidia-smi:

Sat Dec  3 06:44:49 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 527.37       Driver Version: 527.37       CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA A30         TCC   | 00000000:41:00.0 Off |                    0 |
| N/A   48C    P0    39W / 165W |      0MiB / 24576MiB |      0%      Default |
|                               |                      |             Disabled |
+-------------------------------+----------------------+----------------------+
|   1  NVIDIA GeForce ... WDDM  | 00000000:61:00.0  On |                  N/A |
| 24%   41C    P8    15W / 180W |   1411MiB /  8192MiB |     11%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    1   N/A  N/A      2632    C+G   ...y\ShellExperienceHost.exe    N/A      |
|    1   N/A  N/A      6040    C+G   ...ontend\Docker Desktop.exe    N/A      |
|    1   N/A  N/A      8588    C+G   C:\Windows\explorer.exe         N/A      |
|    1   N/A  N/A     10692    C+G   ...n1h2txyewy\SearchHost.exe    N/A      |
|    1   N/A  N/A     10724    C+G   ...artMenuExperienceHost.exe    N/A      |
|    1   N/A  N/A     13060    C+G   ...perience\NVIDIA Share.exe    N/A      |
|    1   N/A  N/A     14252    C+G   ...418.62\msedgewebview2.exe    N/A      |
|    1   N/A  N/A     14816    C+G   ...ge\Application\msedge.exe    N/A      |
|    1   N/A  N/A     15300    C+G   ...lPanel\SystemSettings.exe    N/A      |
|    1   N/A  N/A     15384    C+G   ...ck\app-4.29.149\slack.exe    N/A      |
|    1   N/A  N/A     16488    C+G   ...418.62\msedgewebview2.exe    N/A      |
|    1   N/A  N/A     18084    C+G   ...me\Application\chrome.exe    N/A      |
+-----------------------------------------------------------------------------+

不知何故,它认为它是CUDA 12...总之,WSL是作为WSL 2运行的:

PS C:\Users\olegj> wsl -l -v
  NAME                   STATE           VERSION
* docker-desktop         Running         2
  docker-desktop-data    Running         2

无论我如何从Windows 11运行带GPU的Docker,我都会收到一个错误:
docker:来自守护程序的错误响应:无法创建填充程序任务:OCI运行时创建失败:runc创建失败:无法启动容器进程:容器初始化期间出错:运行挂接#0时出错:运行挂接时出错:退出状态1,标准输出:,stderr:自动检测模式为“传统”nvidia-container-cli:初始化错误:nvml错误:未知错误:未知。
产生同样错误的示例:

docker run --rm --gpus all nvidia/cuda:11.8.0-base-ubuntu20.04 nvidia-smi
 docker run --env NVIDIA_DISABLE_REQUIRE=1 --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody 342 nbody -gpu -benchmark

我的Docker版本是20.10.21, build baeda1f
我的Docker桌面版本是4.15.0 (93002)
那么,在Windows 11上检查什么或如何进一步解决此类错误?
重现步骤:所以有一个GPU在一个新的windows安装我们得到所有正确的,但只要第二个GPU(不同于第一个)是安装我得到的错误,它仍然存在,即使在cuda,docker,cuda在wsl重新安装

u4dcyp6a

u4dcyp6a1#

于是就评论道:

WSL 2 GPU acceleration will be available on Pascal and later GPU architecture on both GeForce and Quadro product SKUs in WDDM mode. It will not be available on Quadro GPUs in TCC mode or Tesla GPUs yet.

And, for the purposes of this description, it is a Tesla GPU. It is not supported in WSL.

因此,我的解决方案如下:
1.忘掉对WSL的希望
1.安装带有Hyper-V虚拟机的Windows服务器(通过PCI-E传递)
1.忘记Windows端的设备
1.在Ubuntu上安装docker,在VM内部通过thrue。Ubuntu上有一些UI rendering problems,但在WSL 2中只有终端,所以meh。
它看起来像这样:

可悲的结果!将希望结束特斯拉用户歧视在WSL 3 =)

相关问题