# 检测 gpu 以及运行 gpudocker 程序,判断是否绑定上
nvidia-smi

docker run --gpus all your_image
您还可以使用以下选项来指定要在容器中使用的 GPU:

--gpus "device=0": 使用第一个 GPU 设备
--gpus "device=1": 使用第二个 GPU 设备
--gpus "device=2,3": 使用第三和第四个 GPU 设备

正常启动

docker run -c 32 --gpus all 

绑定GPU启动


docker run -d -c 32 --gpus '"device=0"'

参考

Runtime options with Memory, CPUs, and GPUs

docker run指定gpu运行 - 海_纳百川 - 博客园