Metadata-Version: 2.4
Name: keep_gpu
Version: 0.2.0
Summary: Keep GPU is a simple CLI app that keeps your GPUs running
Author-email: Siyuan Wang <sywang0227@gmail.com>, Yaorui Shi <yaoruishi@gmail.com>, Yiduck Liu <geodesicseiran@gmail.com>
Maintainer-email: Siyuan Wang <sywang0227@gmail.com>, Yaorui Shi <yaoruishi@gmail.com>, Yiduck Liu <geodesicseiran@gmail.com>
License: MIT license
Project-URL: bugs, https://github.com/Wangmerlyn/KeepGPU/issues
Project-URL: changelog, https://github.com/Wangmerlyn/KeepGPU/blob/master/changelog.md
Project-URL: homepage, https://github.com/Wangmerlyn/KeepGPU
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.rst
Requires-Dist: typer
Requires-Dist: torch
Requires-Dist: colorlog
Provides-Extra: dev
Requires-Dist: coverage; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: bump-my-version; extra == "dev"
Dynamic: license-file

# Keep GPU

[![PyPI Version](https://img.shields.io/pypi/v/keep-gpu.svg)](https://pypi.python.org/pypi/keep-gpu)
[![Docs Status](https://readthedocs.org/projects/keep-gpu/badge/?version=latest)](https://keep-gpu.readthedocs.io/en/latest/?version=latest)

**Keep GPU** is a simple CLI app that keeps your GPUs running.

- 🧾 License: MIT
- 📚 Documentation: https://keep-gpu.readthedocs.io

---

## Features

- Simple command-line interface
- Uses PyTorch and `nvidia-smi` to monitor and load GPUs
- Easy to extend for your own keep-alive logic

---

## TODO ✅

- [ ] Add more CLI args (e.g. `--gpu-id`, `--gpu-ids`, `--gpu-keep-threshold`, `--gpu-keep-time`, `--gpu-keep-vram-usage`)
- [ ] Add documentation
- [ ] Add importable Python functions

---

## Installation

```bash
pip install keep-gpu
```

## Usage


```bash
keep-gpu
```

Specify the interval in microseconds between GPU usage checks (default is 300 seconds):
```bash
keep-gpu --interval 100
```

Specify GPU IDs to run on (default is all available GPUs):
```bash
keep-gpu --gpu-ids 0,1,2
```

## Credits

This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template.
