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

相关推荐
Allen_LVyingbo21 小时前
基于结构化电子病历的临床风险预测模型构建与大模型协同优化
python·安全·机器学习·docker·vim·健康医疗
IT二叔1 天前
Kubernetes(K8s)-01-简介
云原生·容器·kubernetes
暖和_白开水1 天前
数据分析agent(十三_3):docker mysql容器镜像服务的异常错误
mysql·docker·容器
爱小黄1 天前
使用docker搭建集群-使用 Docker 搭建 KingbaseES 集群
运维·docker·容器
余—笙1 天前
Docker安装rabbitmq并安装延迟队列插件
docker·容器·rabbitmq
心念枕惊2 天前
Docker--Docker Swarm集群
运维·docker·容器
敖行客 Allthinker2 天前
docker容器安装Python反推镜像步骤(适用于临时调试用)
python·docker·容器
tonydf2 天前
传统老手艺之容器编排
后端·容器·aiops
张忠琳2 天前
【NVIDIA】NVIDIA k8s-device-plugin v0.19.3 配置API模块深度分析之二
云原生·容器·架构·kubernetes·nvidia
摇曳的精灵2 天前
dify的docker部署
运维·docker·容器·dify