docker run的命令中一定要加入和gpu有关的命令 比如: docker run -dit --gpus 7 nvidia/cuda:11.1.1-cudnn8-runtime-ubuntu20.04 /bin/bash