gpustat-web
===========
A web interface of [`gpustat`][gpustat] ---
aggregate `gpustat` across multiple nodes.
<p align="center">
<img src="screenshot.png" width="800" height="192" />
</p>
**NOTE**: This project is in alpha stage. Errors and exceptions are not well handled, and it might use much network resources. Please use at your own risk!
Installation
-----
```
pip install gpustat-web
```
Python 3.6+ is required.
Usage
-----
Launch the application as follows. A SSH connection will be established to each of the specified hosts.
Make sure `ssh <host>` works under a proper authentication scheme such as SSH authentication.
```
gpustat-web --port 48109 HOST1 [... HOSTN]
```
You might get "Host key is not trusted for `<host>`" errors. You'll have to accept and trust SSH keys of the host for the first time (it's stored in `~/.ssh/known_hosts`);
try `ssh <host>` in the command line, or `ssh -oStrictHostKeyChecking=accept-new <host>` to automatically accept the host key. You can also use an option `gpustat-web --no-verify-host` to bypass SSH Host key validation (although not recommended).
Note that asyncssh [does NOT obey](https://github.com/ronf/asyncssh/issues/108) the `~/.ssh/config` file
(e.g. alias, username, keyfile), so any config in `~/.ssh/config` might not be picked up.
[gpustat]: https://github.com/wookayin/gpustat/
### Endpoints
- `https://HOST:PORT/`: A webpage that updates automatically through websocket.
- `https://HOST:PORT/gpustat.html`: Result as a static HTML page.
- `https://HOST:PORT/gpustat.txt`: Result as a static plain text.
- `https://HOST:PORT/gpustat.ansi`: Result as a static text with ANSI color codes. Try `curl https://.../gpustat.ansi`
Query strings:
- `?nodes=gpu001,gpu002`: Select a subset of nodes to query and display
### Running as a HTTP (SSL/TLS) server
By default the web server will run as a HTTP server.
If you want to run a secure SSL/TLS server over the HTTPS protocol, use `--ssl-certfile` and `--ssl-keyfile` option.
You can use letsencrypt (`certbot`) to create a pair of SSL certificate and keyfile.
Troubleshoothing: Verify SSL/TLS handshaking (if TLS connections cannot be established)
```
openssl s_client -showcerts -connect YOUR_HOST.com:PORT < /dev/null
```
### More Examples
To see CPU usage as well:
```
python -m gpustat_web --exec 'gpustat --color --gpuname-width 25 && echo -en "CPU : \033[0;31m" && cpu-usage | ascii-bar 27'
```
License
-------
MIT License
Copyright (c) 2018-2023 Jongwook Choi
Raw data
{
"_id": null,
"home_page": "https://github.com/wookayin/gpustat-web",
"name": "gpustat-web",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "nvidia-smi gpu cuda monitoring gpustat",
"author": "Jongwook Choi",
"author_email": "wookayin@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b9/35/f0377a8c6d7db02c742fed219b9524953c08b80a5c418e3d99842ed6033f/gpustat-web-0.3.0.tar.gz",
"platform": null,
"description": "gpustat-web\n===========\n\nA web interface of [`gpustat`][gpustat] ---\naggregate `gpustat` across multiple nodes.\n\n<p align=\"center\">\n <img src=\"screenshot.png\" width=\"800\" height=\"192\" />\n</p>\n\n**NOTE**: This project is in alpha stage. Errors and exceptions are not well handled, and it might use much network resources. Please use at your own risk!\n\n\nInstallation\n-----\n\n```\npip install gpustat-web\n```\n\nPython 3.6+ is required.\n\nUsage\n-----\n\nLaunch the application as follows. A SSH connection will be established to each of the specified hosts.\nMake sure `ssh <host>` works under a proper authentication scheme such as SSH authentication.\n\n```\ngpustat-web --port 48109 HOST1 [... HOSTN]\n```\n\nYou might get \"Host key is not trusted for `<host>`\" errors. You'll have to accept and trust SSH keys of the host for the first time (it's stored in `~/.ssh/known_hosts`);\ntry `ssh <host>` in the command line, or `ssh -oStrictHostKeyChecking=accept-new <host>` to automatically accept the host key. You can also use an option `gpustat-web --no-verify-host` to bypass SSH Host key validation (although not recommended).\n\nNote that asyncssh [does NOT obey](https://github.com/ronf/asyncssh/issues/108) the `~/.ssh/config` file\n(e.g. alias, username, keyfile), so any config in `~/.ssh/config` might not be picked up.\n\n\n[gpustat]: https://github.com/wookayin/gpustat/\n\n\n### Endpoints\n\n- `https://HOST:PORT/`: A webpage that updates automatically through websocket.\n- `https://HOST:PORT/gpustat.html`: Result as a static HTML page.\n- `https://HOST:PORT/gpustat.txt`: Result as a static plain text.\n- `https://HOST:PORT/gpustat.ansi`: Result as a static text with ANSI color codes. Try `curl https://.../gpustat.ansi`\n\nQuery strings:\n\n- `?nodes=gpu001,gpu002`: Select a subset of nodes to query and display\n\n\n### Running as a HTTP (SSL/TLS) server\n\nBy default the web server will run as a HTTP server.\nIf you want to run a secure SSL/TLS server over the HTTPS protocol, use `--ssl-certfile` and `--ssl-keyfile` option.\nYou can use letsencrypt (`certbot`) to create a pair of SSL certificate and keyfile.\n\nTroubleshoothing: Verify SSL/TLS handshaking (if TLS connections cannot be established)\n```\nopenssl s_client -showcerts -connect YOUR_HOST.com:PORT < /dev/null\n```\n\n\n### More Examples\n\nTo see CPU usage as well:\n\n```\npython -m gpustat_web --exec 'gpustat --color --gpuname-width 25 && echo -en \"CPU : \\033[0;31m\" && cpu-usage | ascii-bar 27'\n```\n\n\nLicense\n-------\n\nMIT License\n\nCopyright (c) 2018-2023 Jongwook Choi\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A web interface of gpustat --- consolidate status across multiple nodes.",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/wookayin/gpustat-web"
},
"split_keywords": [
"nvidia-smi",
"gpu",
"cuda",
"monitoring",
"gpustat"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b935f0377a8c6d7db02c742fed219b9524953c08b80a5c418e3d99842ed6033f",
"md5": "dcc7c3c1f37f5b115281076d957270e5",
"sha256": "4f2eb3279c62b0930721d3bc9f1fbf4938650f2c7928cf2c919a429c13009729"
},
"downloads": -1,
"filename": "gpustat-web-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "dcc7c3c1f37f5b115281076d957270e5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 10934,
"upload_time": "2023-11-05T23:54:37",
"upload_time_iso_8601": "2023-11-05T23:54:37.348514Z",
"url": "https://files.pythonhosted.org/packages/b9/35/f0377a8c6d7db02c742fed219b9524953c08b80a5c418e3d99842ed6033f/gpustat-web-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-05 23:54:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wookayin",
"github_project": "gpustat-web",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "gpustat-web"
}