Metadata-Version: 2.1
Name: nvsmi
Version: 0.4.0
Summary: A (user-)friendly wrapper to nvidia-smi
Home-page: https://github.com/pmav99/nvsmi
License: MIT
Keywords: packaging,dependency,poetry
Author: Panos Mavrogiorgos
Author-email: pmav99@gmail.com
Requires-Python: >=3.6,<3.7
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Project-URL: Documentation, https://github.com/pmav99/nvsmi
Project-URL: Repository, https://github.com/pmav99/nvsmi
Description-Content-Type: text/markdown

# nvsmi

A (user-)friendly wrapper to `nvidia-smi`.

It can be used to filter the GPUs based on resource usage (e.g. to choose the least utilized GPU on a multi-GPU system).

## Usage

### CLI

```
nvsmi --help
nvsmi ls --help
nvsmi ps --help
```

### As a library

```
import nvsmi

nvsmi.get_gpus()
nvsmi.get_available_gpus()
nvsmi.get_gpu_processes()
```

## Prerequisites

- An nvidia GPU
- `nvidia-smi`
- Python 2.7 or 3.6+

## Installation

### pipx

The recommended installation method is [pipx](https://github.com/pipxproject/pipx).
More specifically, you can install `nvsmi` for your user with:

``` shell
pipx install nvsmi
```

The above command will create a virtual environment in `~/.local/pipx/venvs/nvsmi` and
add the `nvsmi` executable in `~/.local/bin`.

### pip

Alternatively you can use good old `pip` but this is more fragile than `pipx`:

```
pip install --user nvsmi
```

