当前位置:网站首页>[问题已处理]-nvidia-smi命令获取不到自身容器的GPU进程和外部的GPU进程号
[问题已处理]-nvidia-smi命令获取不到自身容器的GPU进程和外部的GPU进程号
2022-07-01 00:40:00 【爷来辣】
导语:在部署docker服务的时候发现容器内部的nvidia-smi命令获取不到自身容器的GPU进程和外部的GPU进程号。验证并找了一些方法解决。
1 使用docker参数pid=host 这个会和容器的systemctl命令冲突
docker run --rm --privileged=true --runtime=nvidia -e NVIDIA_DRIVER_CAPABILITIES=all --pid=host --gpus all nvidia/cuda:10.0-base nvidia-smi

如果是all in one的容器 需要使用systemctl命令则无法使用,目前遇到的正式这种情况。后面靠算法绑定gpu处理了。
2 使用py3smi

pip3 install py3nvml
py3smi
nvidia-smi

https://github.com/fbcotter/py3nvml
3 k8s中 使用hostPID:true

边栏推荐
- 对libco的一点看法
- 文件服务设计
- [LeetCode] 两数之和【1】
- MATLAB 最远点采样(FPS改进版)
- Set different background colors for the border and text of the button
- Exercises on recursion in C language
- 解决IDEA:Class ‘XXX‘ not found in module ‘XXX‘
- Kongyiji's first question: how much do you know about service communication?
- fluttertoast
- Vnctf 2022 cm CM1 re reproduction
猜你喜欢

5. TPM module initialization

Hoo research | coinwave production - nym: building the next generation privacy infrastructure

Locking relay ydb-100, 100V

Sword finger offer 19 Regular Expression Matching

Vnctf 2022 cm CM1 re reproduction

Set different background colors for the border and text of the button

友盟(软件异常实时监听的好帮手:Crash)接入教程(有点基础的小白最易学的教程)

Sword finger offer 18 Delete the node of the linked list

Impact relay zc-23/dc220v

Share your own terminal DIY display banner
随机推荐
Implementation of date class
HDU 2488 A Knight's Journey(DFS)
Orb-slam2 source code learning (II) map initialization
用recyclerReview展示Banner,很简单
[go] go implements row column conversion of sets
【go】go 实现行专列 将集合进行转列
(学习力+思考力) x 行动力,技术人成长的飞轮效应总结
软硬件基础知识学习--小日记(1)
Usage of C set
[original] PLSQL index sorting optimization
Join table query select generation
女朋友说:你要搞懂了MySQL三大日志,我就让你嘿嘿嘿!
Vnctf 2022 cm CM1 re reproduction
What is the difference between Pipeline and Release Pipeline in azure devops?
NE555 waveform generator handle tutorial NE555 internal structure (I)
Docker 部署 MySQL 8
Using C language to realize the exchange between the contents of two arrays (provided that the array is the same size)
ESP8266 RC522
K210 access control complete
JS方法大全的一个小文档