环境
- 操作系统:win10
- WSL2 + Ubuntu 22.04
- 显卡驱动: 546.33
- CUDA: 11.7
报错起因:
执行 docker 运行容器命令:
docker run -it --restart=always --privileged=true -p 7744:7744 --gpus all taihangservice_por:v1.4 bash
报错:
failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy' nvidia-container-cli: mount error: file creation failed: /var/lib/docker/overlay2/d75f7754236c9fea20bc82048e4450fa4635d1079239ccdfdbc0c7e77d296161/merged/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1: file exists: unknown. 文章来源:https://www.toymoban.com/news/detail-817476.html
解决方法
1. 先不使用gpu创建容器
2. 进入容器,删除相关文件(注意根据报错删除文件,不要删多文章来源地址https://www.toymoban.com/news/detail-817476.html
到了这里,关于docker desktop 运行带 --gpus all 参数容器报:Auto-detected mode as ‘legacy‘ nvidia-container-cli: mount error的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!