我正在使用带有 CUDA 的 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 服务器上尝试了该图像,结果证明它可以工作。
您尝试创建名为 torch 的容器,即使该容器已经存在。
查看所有标志和 Docker 文档以了解您使用的参数。