docker中调用GPU算力(debain12系统)

前提,你的debain12系统已经安装好cuda和cudnn以及NVIDIA驱动程序,并且测试过已经可以调用GPU显卡算力

一、安装nvidia-docker

1.添加 NVIDIA 官⽅ Docker APT 仓库的 GPG 密钥:

curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add -

2.添加 NVIDIA 官⽅ Docker APT 仓库:

distribution=$(. /etc/os-release;echo I D ID IDVERSION_ID)

curl -s -L https://nvidia.github.io/nvidia-container-runtime/debian10/nvidia-container-runtime.list\| sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list

3.更新 APT 仓库并安装 nvidia-docker2:

sudo apt-get update && sudo apt-get install nvidia-container-runtime

4.重启docker

sudo systemctl restart docker

5.运行命令

docker run -d --name experience

-p 8508:8508 -p 8509:8509

-v /root/api/panoramic_recognition_experience_api.py:/mmdetection/panoramic_recognition_experience_api.py

-v /root/api/periapical_recognition_experience_api.py:/mmdetection/periapical_recognition_experience_api.py

-v /root/api/config.py:/mmdetection/config.py

-v /root/api/Dental_model:/mmdetection/Dental_model

-v /root/api/experience:/mmdetection/experience

--gpus all experience

相关推荐
虎头金猫5 小时前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
分布式存储与RustFS6 小时前
MinIO 官方 Docker 镜像被移除:依赖它的项目该怎么办
docker·云原生·devops·对象存储·minio·分布式存储
玉&心8 小时前
通过Arthas在线诊断K8S中的内存及JVM等使用情况
docker·k8s·arthas
xing-xing8 小时前
Docker容器中Nginx站点根目录网页配置访问
nginx·docker
赵文宇(温玉)8 小时前
CoreDNS的hosts插件的缺行配置导致k8s集群异常
容器·kubernetes·rancher
guo_wen_qiang8 小时前
上传本地镜像到harbor中
docker·容器·持续部署
羑悻的小杀马特9 小时前
Dockerfile 全景指南:从入门编写dockerfile到生产环境镜像优化实战,一步步带你从啃透制作指令到镜像制作落地!
docker·dockerfile·镜像制作
BianHuanShiZhe9 小时前
docker常见命令
docker
运维开发那些事9 小时前
volcano千卡集群训推最佳实践
ai·gpu算力
正经教主11 小时前
【FDE系列】阶段2:Day 43:Docker Compose — 多容器一键编排
人工智能·docker·fde