无法在 Ubuntu WSL 2 中创建带有 GPU 的容器

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

我正在使用带有 CUDA 的 Ubuntu WSL 2。 CUDA can be used in Ubuntu WSL 2,但我无法使用 PyTorch-GPU 图像创建容器。

~$ docker run -idt --name torch --gpus all -v /mnt/d/Downloads:/workspace pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime /bin/bash
docker: Error response from daemon: Conflict. The container name "/torch" is already in use by container "bcda82a5bb01a3cf1b3f142331aa4448d9eab9e2f15033e1ad57fab372bef50e". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.

我该如何解决?

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

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

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

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

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