nvitop 安装及使用
因为nvitop
采用纯Python
编写,所以推荐采用pip
命令进行安装,官方安装说明文档中提供了五种安装方式:
- 使用pipx进行安装
pipx run nvitop
- 使用pip3进行安装
pip3 install --upgrade nvitop
- 使用conda进行安装
conda install -c conda-forge nvitop
- 从Github拉取最新版本进行安装
pip3 install git+https://github.com/XuehaiPan/nvitop.git#egg=nvitop
- clone项目并手动安装
git clone --depth=1 https://github.com/XuehaiPan/nvitop.git
cd nvitop
pip3 install .
「注意」 如果在安装后遇到nvitop: command not found
错误,请检查你是否将Python
控制台脚本路径(例如,${HOME}/.local/bin
)添加到您的PATH
环境变量中。或者,你可以直接使用python3 -m nvitop
命令
使用方法
命令行使用方法
# Monitor mode (when the display mode is omitted, `NVITOP_MONITOR_MODE` will be used)
$ nvitop # or use `python3 -m nvitop`
# Automatically configure the display mode according to the terminal size
$ nvitop -m auto # shortcut: `a` key
# Arbitrarily display as `full` mode
$ nvitop -m full # shortcut: `f` key
# Arbitrarily display as `compact` mode
$ nvitop -m compact # shortcut: `c` key
# Specify query devices (by integer indices)
$ nvitop -o 0 1 # only show <GPU 0> and <GPU 1>
# Only show devices in `CUDA_VISIBLE_DEVICES` (by integer indices or UUID strings)
$ nvitop -ov
# Only show GPU processes with the compute context (type: 'C' or 'C+G')
$ nvitop -c
# Use ASCII characters only
$ nvitop -U # useful for terminals without Unicode support
# For light terminals
$ nvitop --light
# For spectrum-like bar charts (requires the terminal supports 256-color)
$ nvitop --colorful
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!