chore: rename project to nvitop

This commit is contained in:
XuehaiPan 2021-02-08 14:37:07 +08:00
parent efe708e31b
commit a002ec655b
16 changed files with 49 additions and 49 deletions

View file

@ -1,10 +1,10 @@
<!--
Thank you for contributing to nvhtop by opening this issue.
Thank you for contributing to nvitop by opening this issue.
Please check through this list, so you can be as helpful as possible:
1. Was this issue already reported? Please do a quick search.
2. Maybe the problem is solved in the current master branch already?
Simply clone nvhtop's git repository and run ./nvhtop.py to find out.
Simply clone nvitop's git repository and run ./nvitop.py to find out.
3. Provide all the relevant information, as outlined in this template.
Feel free to remove any sections you don't need.
-->
@ -15,7 +15,7 @@
- Terminal emulator and version:
- Python version:
- NVML/CUDA version:
- `nvhtop` version/commit:
- `nvitop` version/commit:
- `python-ml-py` version:
- Locale:
@ -44,7 +44,7 @@
#### Traceback
<!-- If nvhtop crashes, paste the traceback in the quotes below. -->
<!-- If nvitop crashes, paste the traceback in the quotes below. -->
```

View file

@ -15,7 +15,7 @@
- Terminal emulator and version:
- Python version:
- NVML/CUDA version:
- `nvhtop` version/commit:
- `nvitop` version/commit:
- `python-ml-py` version:
- Locale:

View file

@ -1,4 +1,4 @@
# nvhtop
# nvitop
An interactive Nvidia-GPU process viewer.
@ -27,17 +27,17 @@ This project is inspired by [`nvidia-htop`](https://github.com/peci1/nvidia-htop
## Installation
Install `nvhtop` using `pip` from GitHub:
Install `nvitop` using `pip` from GitHub:
```bash
$ pip install git+https://github.com/XuehaiPan/nvhtop.git#egg=nvhtop
$ pip install git+https://github.com/XuehaiPan/nvitop.git#egg=nvitop
```
Or, clone this repo and install `nvhtop` manually:
Or, clone this repo and install `nvitop` manually:
```bash
$ git clone --depth=1 https://github.com/XuehaiPan/nvhtop.git
$ cd nvhtop
$ git clone --depth=1 https://github.com/XuehaiPan/nvitop.git
$ cd nvitop
$ pip install .
```
@ -47,37 +47,37 @@ Query the device and process status. The output is similar to `nvidia-smi`, but
```bash
# Query status of all devices
$ nvhtop
$ nvitop
# Specify query devices
$ nvhtop -o 0 1 # only show <GPU 0> and <GPU 1>
$ nvitop -o 0 1 # only show <GPU 0> and <GPU 1>
```
Run as a resource monitor, like `htop`:
```bash
# Automatically configure the display mode according to the terminal size
$ nvhtop -m
$ nvitop -m
# Forcibly display as `full` mode
$ nvhtop -m full
$ nvitop -m full
# Forcibly display as `compact` mode
$ nvhtop -m compact
$ nvitop -m compact
# Specify query devices
$ nvhtop -m -o 0 1 # only show <GPU 0> and <GPU 1>
$ nvitop -m -o 0 1 # only show <GPU 0> and <GPU 1>
# Only show devices in `CUDA_VISIBLE_DEVICES`
$ nvhtop -m -ov
$ nvitop -m -ov
```
Press `q` to return to the terminal.
Type `nvhtop --help` for more information:
Type `nvitop --help` for more information:
```
usage: nvhtop [-h] [-m [{auto,full,compact}]] [-o idx [idx ...]] [-ov]
usage: nvitop [-h] [-m [{auto,full,compact}]] [-o idx [idx ...]] [-ov]
[--gpu-util-thresh th1 th2] [--mem-util-thresh th1 th2]
A interactive Nvidia-GPU process viewer.
@ -105,11 +105,11 @@ optional arguments:
![Screen Recording](https://user-images.githubusercontent.com/16078332/107175086-e0468c80-6a06-11eb-98c3-7ead90ec01e2.gif)
Example output of `nvhtop`:
Example output of `nvitop`:
<img src="https://user-images.githubusercontent.com/16078332/107147678-4640fe80-698a-11eb-9160-7d85e12f8fef.png" alt="Screenshot">
Example output of `nvhtop -m`:
Example output of `nvitop -m`:
<table>
<tr valign="center">

View file

@ -1,11 +1,11 @@
#!/usr/bin/python3
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# License: GNU GPL version 3.
import sys
from nvhtop.main import main
from nvitop.main import main
if __name__ == '__main__':

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# License: GNU GPL version 3.
"""An interactive Nvidia-GPU process viewer."""

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# License: GNU GPL version 3.
# pylint: disable=missing-module-docstring,missing-class-docstring,missing-function-docstring

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# This file is originally part of ranger, the console file manager. https://github.com/ranger/ranger
# License: GNU GPL version 3.

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# This file is originally part of ranger, the console file manager. https://github.com/ranger/ranger
# License: GNU GPL version 3.

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# License: GNU GPL version 3.
# pylint: disable=missing-module-docstring,missing-class-docstring,missing-function-docstring

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# License: GNU GPL version 3.
import argparse
@ -17,7 +17,7 @@ def parse_arguments():
coloring_rules = '{} < th1 %% <= {} < th2 %% <= {}'.format(colored('light', 'green'),
colored('moderate', 'yellow'),
colored('heavy', 'red'))
parser = argparse.ArgumentParser(prog='nvhtop', description='A interactive Nvidia-GPU process viewer.',
parser = argparse.ArgumentParser(prog='nvitop', description='A interactive Nvidia-GPU process viewer.',
formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('-m', '--monitor', type=str, default='notpresented',
nargs='?', choices=['auto', 'full', 'compact'],
@ -41,7 +41,7 @@ def parse_arguments():
if args.monitor is None:
args.monitor = 'auto'
if args.monitor != 'notpresented' and not (sys.stdin.isatty() and sys.stdout.isatty()):
print('Error: Must run nvhtop monitor mode from terminal', file=sys.stderr)
print('Error: Must run nvitop monitor mode from terminal', file=sys.stderr)
return 1
if args.gpu_util_thresh is not None:
Device.GPU_UTILIZATION_THRESHOLDS = tuple(sorted(args.gpu_util_thresh))

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# This file is originally part of ranger, the console file manager. https://github.com/ranger/ranger
# License: GNU GPL version 3.

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# License: GNU GPL version 3.
# pylint: disable=missing-module-docstring,missing-class-docstring,missing-function-docstring

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# License: GNU GPL version 3.
# pylint: disable=missing-module-docstring,missing-class-docstring,missing-function-docstring

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# License: GNU GPL version 3.
# pylint: disable=missing-module-docstring,missing-class-docstring,missing-function-docstring

View file

@ -1,4 +1,4 @@
# This file is part of nvhtop, the interactive Nvidia-GPU process viewer.
# This file is part of nvitop, the interactive Nvidia-GPU process viewer.
# License: GNU GPL version 3.
# pylint: disable=missing-module-docstring,missing-class-docstring,missing-function-docstring

View file

@ -2,7 +2,7 @@ import sys
from setuptools import setup, find_packages
import nvhtop
import nvitop
extra_description = {}
@ -14,18 +14,18 @@ except OSError:
pass
setup(
name='nvhtop',
version=nvhtop.__version__,
description=nvhtop.__doc__,
name='nvitop',
version=nvitop.__version__,
description=nvitop.__doc__,
**extra_description,
license=nvhtop.__license__,
author=nvhtop.__author__,
author_email=nvhtop.__email__,
url="https://github.com/XuehaiPan/nvhtop.git",
packages=find_packages(include=['nvhtop', 'nvhtop.*']),
license=nvitop.__license__,
author=nvitop.__author__,
author_email=nvitop.__email__,
url="https://github.com/XuehaiPan/nvitop.git",
packages=find_packages(include=['nvitop', 'nvitop.*']),
entry_points={
'console_scripts': [
'nvhtop=nvhtop.main:main'
'nvitop=nvitop.main:main'
],
},
install_requires=(['windows-curses'] if sys.platform == 'windows' else []) + [
@ -57,7 +57,7 @@ setup(
],
keywords='nvidia, nvidia-smi, GPU, htop, top',
project_urls={
'Bug Reports': 'https://github.com/XuehaiPan/nvhtop/issues',
'Source': 'https://github.com/XuehaiPan/nvhtop'
'Bug Reports': 'https://github.com/XuehaiPan/nvitop/issues',
'Source': 'https://github.com/XuehaiPan/nvitop'
},
)