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

相关推荐
要开心吖ZSH几秒前
测试环境 K8s 502 故障复盘:被 ClusterIP 表象误导,最终定位 kube-proxy 规则缺失
云原生·容器·kubernetes·k8s·502 bad gateway·kube-proxy
纵道软件4 分钟前
使用 Docker 构建自定义 SeaTunnel Web 服务镜像
前端·docker·容器
AAA@峥19 小时前
K8s 流量入口管理|Ingress 核心原理 + ingress-nginx 部署 + 生产实战案例合集
nginx·容器·kubernetes
GlueNa2SiO321 小时前
10-Docker生产环境部署与K8s入门
笔记·学习·docker·容器·kubernetes
Kismet_nvi21 小时前
《Kubernetes 网络进阶、调度策略与自动扩缩容实战精要》
网络·容器·kubernetes
蜀道山老天师1 天前
Zabbix监控Docker容器应用实践完整指南
linux·运维·docker·容器·zabbix
星空1 天前
WordPress在docker中部署
运维·docker·容器
wsad05321 天前
CentOS Stream 10 Docker 容器无法访问外网:xt_addrtype 内核模块缺失解决方法
linux·网络·docker·云原生·eureka·centos
怦怦蓝1 天前
Windows 安装 Docker Desktop 踩坑完整实战指南(WSL2 故障排错实录)
windows·docker·容器
看-是灰机1 天前
Harbor Framework
docker