|
1 | | -# MyGPU: 轻量级 GPU 管理工具 |
2 | | - |
3 | | -MyGPU 是一个轻量级的 GPU 管理工具,它是一个紧凑的 `nvidia-smi` 替代品,配有一个优雅的网络仪表盘。 |
| 1 | +<!-- HTML_BLOCK:1... --> |
| 2 | + |
| 3 | +<div align="center"> |
| 4 | + <a href="../README.md">🇺🇸 English</a> | |
| 5 | + <a href="../locales/README.de.md">🇩🇪 Deutsch</a> | |
| 6 | + <a href="../locales/README.fr.md">🇫🇷 Français</a> | |
| 7 | + <a href="../locales/README.es.md">🇪🇸 Español</a> | |
| 8 | + <a href="../locales/README.ja.md">🇯🇵 日本語</a> | |
| 9 | + <a href="../locales/README.zh.md">🇨🇳 中文</a> | |
| 10 | + <a href="../locales/README.pt.md">🇵🇹 Português</a> | |
| 11 | + <a href="../locales/README.ko.md">🇰🇷 한국어</a> | |
| 12 | + <a href="../locales/README.hi.md">🇮🇳 हिंदी</a> |
| 13 | +</div> |
| 14 | + |
| 15 | +<!-- HTML_BLOCK:2... --> |
| 16 | + |
| 17 | +<div style="text-align:center; margin:18px 0;"> |
| 18 | + <img src="../monitor/api/static/logo.png" alt="MyGPU logo"/> |
| 19 | +</div> |
| 20 | + |
| 21 | +<!-- HTML_BLOCK:... --> |
| 22 | + |
| 23 | +> *MyGPU: Lightweight GPU Management Utility: a compact `nvidia-smi` wrapper with an elegant web dashboard.* |
| 24 | +<!-- HTML_BLOCK: no change to url; output entire as it is... --> |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +## 画廊 |
| 32 | + |
| 33 | +<details> |
| 34 | + <summary>Web Dashboard</summary> |
| 35 | + <div style="display:flex; overflow-x:auto; gap:10px; padding:12px 0; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;"> |
| 36 | + <!-- Use first image aspect ratio 1624x675 for slide frame; images fit inside using object-fit:contain --> |
| 37 | + <div style="flex:0 0 100%; scroll-snap-align:center; aspect-ratio:1624/675; display:flex; align-items:center; justify-content:center;"> |
| 38 | + <img src="../monitor/api/static/web1.png" style="width:100%; height:100%; object-fit:contain;" /> |
| 39 | + </div> |
| 40 | + <div style="flex:0 0 100%; scroll-snap-align:center; aspect-ratio:1624/675; display:flex; align-items:center; justify-content:center;"> |
| 41 | + <img src="../monitor/api/static/web2.png" style="width:100%; height:100%; object-fit:contain;" /> |
| 42 | + </div> |
| 43 | + <div style="flex:0 0 100%; scroll-snap-align:center; aspect-ratio:1624/675; display:flex; align-items:center; justify-content:center;"> |
| 44 | + <img src="../monitor/api/static/web3.png" style="width:100%; height:100%; object-fit:contain;" /> |
| 45 | + </div> |
| 46 | + <div style="flex:0 0 100%; scroll-snap-align:center; aspect-ratio:1624/675; display:flex; align-items:center; justify-content:center;"> |
| 47 | + <img src="../monitor/api/static/web4.png" style="width:100%; height:100%; object-fit:contain;" /> |
| 48 | + </div> |
| 49 | + </div> |
| 50 | + |
| 51 | +</details> |
| 52 | + |
| 53 | +<details> |
| 54 | + <summary>CLI</summary> |
| 55 | + <div style="display:flex; overflow-x:auto; gap:10px; padding:12px 0; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;"> |
| 56 | + |
| 57 | + <div style="flex:0 0 100%; scroll-snap-align:center; aspect-ratio:1624/675; display:flex; align-items:center; justify-content:center;"> |
| 58 | + <img src="../monitor/api/static/cli1.png" style="width:100%; height:100%; object-fit:contain;" /> |
| 59 | + </div> |
| 60 | + <div style="flex:0 0 100%; scroll-snap-align:center; aspect-ratio:1624/675; display:flex; align-items:center; justify-content:center;"> |
| 61 | + <img src="../monitor/api/static/cli2.png" style="width:100%; height:100%; object-fit:contain;" /> |
| 62 | + </div> |
| 63 | + <div style="flex:0 0 100%; scroll-snap-align:center; aspect-ratio:1624/675; display:flex; align-items:center; justify-content:center;"> |
| 64 | + <img src="../monitor/api/static/cli3.png" style="width:100%; height:100%; object-fit:contain;" /> |
| 65 | + </div> |
| 66 | + <div style="flex:0 0 100%; scroll-snap-align:center; aspect-ratio:1624/675; display:flex; align-items:center; justify-content:center;"> |
| 67 | + <img src="../monitor/api/static/cli4.png" style="width:100%; height:100%; object-fit:contain;" /> |
| 68 | + </div> |
| 69 | + <div style="flex:0 0 100%; scroll-snap-align:center; aspect-ratio:1624/675; display:flex; align-items:center; justify-content:center;"> |
| 70 | + <img src="../monitor/api/static/cli5.png" style="width:100%; height:100%; object-fit:contain;" /> |
| 71 | + </div> |
| 72 | +</details> |
| 73 | + |
| 74 | +### 为什么使用这个工具? |
| 75 | + |
| 76 | +- **轻量级**:最小化资源占用。 |
| 77 | +- **灵活**:作为 CLI 工具运行,或提供全功能的 Web 仪表板。 |
| 78 | +- **管理员优先**:包括 VRAM 强制执行(自动杀死超出限制的进程)和监控列表等功能。 |
| 79 | +- **开发人员友好**:内置基准测试和压力测试工具(GEMM、粒子物理),以验证系统稳定性。 |
| 80 | + |
| 81 | +--- |
4 | 82 |
|
5 | 83 | ## 功能 |
6 | 84 |
|
7 | | -- **实时监控**:获取 GPU 和系统指标(利用率、VRAM、功耗、温度等)。 |
8 | | -- **管理与强制执行**:设置 VRAM 限制,自动终止超出限制的进程(仅管理员),创建监控列表。 |
9 | | -- **基准测试与模拟**:配置 GEMM 工作负载进行热量限制和稳定性测试,进行交互式 3D 粒子物理模拟以可视化 GPU 加载。 |
| 85 | +- **实时监控**: |
| 86 | + - GPU 详细指标(利用率、VRAM、功耗、温度)。 |
| 87 | + - 系统指标(CPU、内存等)。 |
| 88 | + |
| 89 | +- **管理员与强制执行**: |
| 90 | + - **VRAM 限制**:为每个 GPU 设置 VRAM 使用量的硬限额。 |
| 91 | + - **自动终止**:(仅管理员可用)自动终止违反 VRAM 策略的进程。 |
| 92 | + - **监控列表**:监控特定 PID 或过程名称。 |
| 93 | + |
| 94 | +- **基准测试与模拟**: |
| 95 | + - **压力测试**:配置可变的 GEMM 加载项,以测试热量限制和稳定性。 |
| 96 | + - **视觉模拟**:交互式 3D 粒子物理模拟,以可视化 GPU 加载。 |
| 97 | + |
| 98 | +--- |
10 | 99 |
|
11 | 100 | ## 路线图与未来工作 |
12 | 101 |
|
13 | | -欢迎贡献!未来要涵盖的主要点包括: |
| 102 | +欢迎贡献!主要需要涵盖的未来要点如下: |
14 | 103 |
|
15 | | -- **多 GPU 支持**:增强对多卡设置和 NVLink 拓扑的处理。 |
16 | | -- **容器化**:官方 Docker 支持,方便在容器化环境中部署。 |
| 104 | +- **多 GPU 支持**:增强多卡设置和 NVLink 拓扑处理。 |
| 105 | +- **容器化**:官方 Docker 支持,方便在容器环境中部署。 |
17 | 106 | - **远程访问**:SSH 隧道集成和安全远程管理。 |
18 | 107 | - **跨平台**: |
19 | | - - 支持 Linux(Ubuntu/Debian 重点)。 |
20 | | - - 支持 Apple Silicon 的 macOS。 |
21 | | -- **硬件无关性**: |
22 | | - - AMD ROCm 支持。 |
23 | | - - Intel Arc 支持。 |
24 | | -- **多语言文档**:支持 GitHub 社区中流行的语言。 |
| 108 | + - [ ] Linux 支持(Ubuntu/Debian 重点)。 |
| 109 | + - [ ] macOS 支持(Apple Silicon 监控)。 |
| 110 | +- **硬件无归属**: |
| 111 | + - [ ] AMD ROCm 支持。 |
| 112 | + - [ ] Intel Arc 支持。 |
| 113 | +- ~~**多语言文档**:支持 GitHub 上最受欢迎的编程语言。~~ |
25 | 114 |
|
26 | 115 | 请参阅 [CONTRIBUTING.md](../CONTRIBUTING.md) 了解如何参与。 |
27 | 116 |
|
| 117 | +--- |
| 118 | + |
28 | 119 | ## 要求 |
29 | 120 |
|
30 | 121 | - **操作系统**:Windows 10/11 |
31 | 122 | - **Python**:3.10+ |
32 | | -- **硬件**:NVIDIA GPU 和已安装的驱动程序。 |
33 | | -- **CUDA**:12.x(严格要求基准测试和模拟功能)。 |
34 | | - - *注意:如果未检测到 CUDA 12.x,则基准测试功能将禁用。* |
| 123 | +- **硬件**:NVIDIA GPU 与安装的驱动程序。 |
| 124 | +- **CUDA**:12.x 工具包(严格需要基准测试/模拟功能)。 |
| 125 | + - *注意:如果未检测到 CUDA 12.x,GPU 特定基准功能将禁用*。 |
| 126 | + |
| 127 | +--- |
35 | 128 |
|
36 | 129 | ## 安装 |
37 | 130 |
|
38 | | -工具支持模块化安装以适应您的需求: |
| 131 | +该工具支持模块化安装以适应您的需求: |
39 | 132 |
|
40 | | -### 1. 最小化(仅 CLI) |
| 133 | +### 1. 最小(仅 CLI) |
41 | 134 |
|
42 | | -适用于无头服务器或后台监控。 |
| 135 | +适合无头服务器或后台监控的最佳选择。 |
43 | 136 |
|
44 | 137 | - 命令行界面。 |
45 | 138 | - 基本系统/GPU 指标。 |
46 | 139 |
|
47 | | -### 2. 标准(CLI + 网络 UI) |
| 140 | +### 2. 标准(CLI + Web UI) |
48 | 141 |
|
49 | | -适用于大多数用户。 |
| 142 | +适合大多数用户。 |
50 | 143 |
|
51 | | -- 包含网络仪表盘。 |
| 144 | +- 包括 Web 仪表板。 |
52 | 145 | - REST API 端点。 |
53 | 146 | - 实时图表。 |
54 | | -- 但不包括模拟或基准测试。 |
55 | | - |
56 | | -### 3. 完整(标准 + 视觉化) |
57 | | - |
58 | | -适用于开发和压力测试。 |
| 147 | +- 但无模拟或基准测试。 |
59 | 148 |
|
60 | | -- 包含模拟。 |
61 | | -- PyTorch/CuPy 依赖基准测试。 |
| 149 | +### 3. 完整(标准 + 可视化) |
62 | 150 |
|
63 | | -### 快速开始 |
| 151 | +适合开发和压力测试的最佳选择。 |
64 | 152 |
|
65 | | -1. **下载** 最新版本或克隆仓库。 |
66 | | -2. **运行安装**: |
| 153 | +- 包括模拟。 |
| 154 | +- PyTorch/CuPy 依赖的基准测试。 |
67 | 155 |
|
68 | | - ```powershell |
69 | | - .\setup.ps1 |
70 | | - ``` |
| 156 | +```powershell |
| 157 | + .\setup.ps1 |
| 158 | + ``` |
71 | 159 |
|
72 | | -3. **启动**: |
| 160 | +3. **发布** |
73 | 161 |
|
74 | 162 | ```powershell |
75 | | -# 启动网络仪表盘(标准/完整) |
| 163 | +# Start the web dashboard (Standard/Full) |
76 | 164 | python health_monitor.py web |
77 | 165 |
|
78 | | -# 启动 CLI |
| 166 | +# Start the CLI |
79 | 167 | python health_monitor.py cli |
80 | 168 | ``` |
81 | 169 |
|
82 | 170 | ## 许可证 |
83 | 171 |
|
84 | | -MIT 许可证。请参阅 [LICENSE](../LICENSE) 了解详情。 |
| 172 | +MIT 许可证。详细信息请见 [LICENSE](../LICENSE)。 |
| 173 | + |
0 commit comments