A (user-)friendly wrapper to nvidia-smi
Project description
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.
More specifically, you can install nvsmi
for your user with:
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nvsmi-0.4.2.tar.gz
(5.2 kB
view details)
Built Distribution
nvsmi-0.4.2-py3-none-any.whl
(5.5 kB
view details)
File details
Details for the file nvsmi-0.4.2.tar.gz
.
File metadata
- Download URL: nvsmi-0.4.2.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.6.9 Linux/4.15.0-72-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1a391c7c4dadc6ec572909ff0372451d464ebadc144e5aa5fbbcc893dcb7bfa |
|
MD5 | abaa1ff869381239aff9e2ca531470c5 |
|
BLAKE2b-256 | 9d13c5da04d29f4e5f830a8558601b3e179163d0d94e0da06529d5a8e62eed9e |
File details
Details for the file nvsmi-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: nvsmi-0.4.2-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.6.9 Linux/4.15.0-72-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 718894c24bdf7b58b8ecdfd282dceb06ef120a4b4e0b8517193cba876174945e |
|
MD5 | c3a58a1c6a88417fb8540d173319f610 |
|
BLAKE2b-256 | d2d56ec6d6410b434463ba76900d2363a1f75c474f3442a4365557b2588fa14b |