报错 RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking argument for argument mat2 in method wrapper_CUDA_mm) 解决方案 docker run --gpus all -d -v 改成 docker run --gpus "device=0" -d -v 在容器层面限制调用的GPU显卡,防止代码自动调用多张显卡,导致报错