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

相关推荐
xbzb20 小时前
Kubernetes 节点删除后还有残留?drain、reset 与集群销毁重建全流程
容器·kubernetes·kubectl·集群·reset·drain
正在走向自律20 小时前
Infra 现代研发基础设施实战:从 IaC、K8s 到平台工程与可观测性
云原生·容器·kubernetes·terraform·github actions·infra
AI开源软件21 小时前
Kubernetes 网络实战:打通 Pod、Service 与集群外任务调度器的双向调用
docker·nacos·kubernetes·xxl-job·calico·微服务部署·ruoyi office
csdn_aspnet1 天前
Docker 啟動MySQL Server連上MySQL Workbench
mysql·docker·容器
月夏1 天前
我把全栈项目塞进已有 nginx 的服务器,卡我最久的是三个斜杠
nginx·react.js·docker
瑞克-桑切斯2 天前
Kubernetes 1.28 保姆级新手学习教程
运维·学习·docker·云原生·容器·kubernetes
对象存储与RustFS2 天前
对象锁遇上版本化:删掉的对象还在,真删的又删不掉
后端·docker·云原生
遇雪长安2 天前
wslc 来了:Docker Desktop 还要留着吗?
运维·docker·容器
csdn_aspnet2 天前
【Docker 攻略】MySQL 安裝篇
运维·mysql·docker·容器
艺杯羹2 天前
ufw 已 active,Docker 端口却仍对外开放的复盘
运维·docker·容器