如何修复 Ubuntu WSL 2 中 Docker 中的“无法选择具有功能的设备驱动程序”:[[gpu]]”[已关闭]

问题描述 投票:0回答:1

我正在使用带有 CUDA 的 Ubuntu WSL 2。 CUDA 可以在 Ubuntu WSL 2 中使用:

但是我无法使用 PyTorch-GPU 图像创建容器。错误如下:

lyd@LAPTOP-K9JJE710:~$ docker run -idt --name torch --gpus all -v /mnt/d/Downloads:/workspace pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime /bin/bash
6ab71bf2dee67571df41d6880d53393a289c5cf8673b5daea1581f85ac3102c2
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

我该如何解决?

我在另一台 Ubuntu GPU 服务器上尝试了该图像,结果证明它可以工作。

docker pytorch cuda windows-subsystem-for-linux nvidia-docker
1个回答
-2
投票

您尝试创建名为 torch 的容器,即使该容器已经存在。

查看所有标志和 Docker 文档以了解您使用的参数。

© www.soinside.com 2019 - 2024. All rights reserved.