Quickly summarize free GPUs across SSH servers
Project description
gpufree
gpufree is a small CLI for checking free NVIDIA GPUs across servers listed in
your SSH config. It runs nvidia-smi over SSH, queries hosts concurrently, and
prints a compact summary by default.
$ gpufree
HOST IDLE/TOTAL
---- ----------
4090 4/8
L40 0/4
5090 4/4
Use --detailed when you need the per-GPU table:
$ gpufree --detailed
HOST GPU FREE/TOTAL UTIL TEMP STATE PROCS
---- ------------------------- --------------- ---- ---- ----- --------------
4090 0 NVIDIA GeForce RTX 4090 24546/24564 MiB 0% 36C idle -
4090 1 NVIDIA GeForce RTX 4090 12000/24564 MiB 80% 52C busy python:12000MiB
Requirements
- Python 3.10+
sshavailable locally- Passwordless SSH access to target hosts
nvidia-smiavailable on target hosts
The package has no runtime Python dependencies.
Installation
From PyPI, after release:
pip install gpufree
For local development:
git clone https://github.com/raymondzhou/gpufree.git
cd gpufree
uv sync --dev
uv run gpufree
Usage
Check all default hosts from ~/.ssh/config:
gpufree
Check selected hosts:
gpufree 4090 L40
Filter default host discovery:
gpufree --include '*90'
gpufree --exclude 3090
If one SSH alias points to your current machine, exclude it permanently with an environment variable:
export GPUFREE_EXCLUDE=3090
Use JSON for scripts:
gpufree --json
Shell Completion
For zsh:
mkdir -p ~/.local/share/zsh/site-functions
gpufree --print-zsh-completion > ~/.local/share/zsh/site-functions/_gpufree
Make sure this directory is in fpath before compinit runs:
fpath=("$HOME/.local/share/zsh/site-functions" $fpath)
Restart zsh or run:
exec zsh
Host Discovery
When no hosts are passed explicitly, gpufree reads ~/.ssh/config and selects
plain Host aliases. It skips wildcard aliases, github.com, entries with
User git, and aliases that appear to point to the current machine unless
--include-local is set.
Development
uv sync --dev
uv run pytest
uv run ruff check .
uv build
Build artifacts are written under dist/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gpufree-0.1.0.tar.gz.
File metadata
- Download URL: gpufree-0.1.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9a08417332b17a864c7cfab417017fdde3df6829e84f76ceaf14ff12393dd52
|
|
| MD5 |
23e82b9d70bf1bea3392e9dc620a1f40
|
|
| BLAKE2b-256 |
7a2fdfca23ebfda60c40a4a14b8af9489e090f29ef939f02fb13b3bfb43d46c9
|
File details
Details for the file gpufree-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gpufree-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
155023d23f051b380fbb0434c5e9880053b1458f6c669ae0ec5a318f2b36d06b
|
|
| MD5 |
214e07ec5cb1eef7612ed0bb767e9c36
|
|
| BLAKE2b-256 |
054775076917930946328542a2ccd56901c8e8d414b883c2eb8da6ad480f3f74
|