当前位置:网站首页>[问题已处理]-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

边栏推荐
- Openmv and k210 of the f question of the 2021 video game call the openmv API for line patrol, which is completely open source.
- [original] PLSQL index sorting optimization
- 文件服务设计
- Pytorch installs and uses GPU acceleration
- Mustache syntax
- Some views on libco
- Two position relay st2-2l/ac220v
- K210 site helmet
- Unhandled Exception: MissingPluginException(No implementation found for method launch on channel)
- 染色法判断二分图
猜你喜欢

HDU 2488 A Knight's Journey(DFS)

Win11安装redis 数据库以及redis desktop manager的下载

For the first time in more than 20 years! CVPR best student thesis awarded to Chinese college students!

双位置继电器DLS-5/2 DC220V

Packing and unpacking of C #

Sword finger offer 19 Regular Expression Matching

fluttertoast

Training discipline principle of robot programming

Gavin's insight on the transformer live broadcast course - rasa project's actual banking financial BOT Intelligent Business Dialogue robot system startup, language understanding, dialogue decision-mak

Analyze the maker education path integrating the essence of discipline
随机推荐
Principes de formation de la programmation robotique
Inspire students' diversified thinking with steam Education
解析创客教育实践中的智慧原理
What is product thinking
(learning power + thinking power) x action power, summary of flywheel effect on the growth of technicians
Pytorch installs and uses GPU acceleration
Get screen height
Analyze the maker education path integrating the essence of discipline
ESP8266 RC522
蒹葭苍苍,白露为霜。
文件服务设计
闭锁继电器YDB-100、100V
5. TPM module initialization
2021电赛F题openmv和K210调用openmv api巡线,完全开源。
Install redis database and download redis Desktop Manager in win11
2022 is half way through. It's hard to make money
分割链表[先取next再斩断链表防止断链]
Sword finger offer 18 Delete the node of the linked list
K210工地安全帽
Join table query select generation