Skip to main content

GPUSitter

Watch for idle GPUs and run your jobs: launches jobs in tmux, keeps logs/status and sends start/finish emails..

Features

  • Real-time GPU usage monitoring
  • Command-line interface, easy to integrate into workflows
  • Email notifications
  • Scheduled automatic job running

Dependencies

  • tmux

Installation

pip install gpusitter

Usage

# One job with 1 gpu
gpust --job="python train.py"

# One job with 4 gpus
gpust --job="python train.py:4"

# Two jobs with 1 gpu and 4 gpus respectively
gpust --job="python train.py" --job="python train.py --epoch=12 --lr=-.001:4"

# With CUDA_VISIBLE_DEVICES env
CUDA_VISIBLE_DEVICES=2 gpust --job="python train.py"

# With different python envs
gpust --job="~/job1/.venv/bin/python train1.py" --job="~/job2/.venv/bin/python train2.py"

After starting your job, you can monitor its progress using tmux.

# List all running tmux sessions
tmux ls

# Attach to your job session (replace GPUSitter_xxx_xx with your session name)
tmux a -t GPUSitter_xxx_xx

Parameter description:

class ConfigData:
    """Configuration data for GPU Snatcher."""

    gpu_free_memory_ratio_threshold: float
    friendly_min: float
    email_host: str
    email_user: str
    email_pwd: str
    email_sender: str
    email_receivers: list[str]
  • gpu_free_memory_ratio_threshold: The minimum free GPU memory ratio required to consider a GPU available. Only GPUs with free memory above this threshold will be used.
  • friendly_min: Waiting time (in seconds) before allocating GPUs. Helps prevent OOM from previous jobs.
  • email_host: Email server, e.g., smtp.qq.com
  • email_user: Email address
  • email_pwd: SMTP authorization code
  • email_sender: Sender
  • email_receivers: Recipients

Contribution

Issues and pull requests are welcome. Please follow the project's code style guidelines.

License

This project is licensed under the MIT License.

Metadata

Release files for gpusitter 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gpusitter 2.1.1
File Size Uploaded Provenance Actions
gpusitter-2.1.1.tar.gz 9.2 kB Without provenance Details for gpusitter-2.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gpusitter 2.1.1
File Interpreter ABI Platform Actions
gpusitter-2.1.1-py3-none-any.whl Python 3 none any Details for gpusitter-2.1.1-py3-none-any.whl

Total release size: 20.1 kB

Release files / gpusitter-2.1.1.tar.gz

Download URL gpusitter-2.1.1.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bbea5bccaf35d2e06c8c8929f916468fab8d39595e5d32f0a03cf0a97dc926c0
BLAKE2b-256 checksum
How to use checksums
df33826af9695330edbb35054d1b9ac8ad5bd214a88d51c3bd067db7aa407f45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Release files / gpusitter-2.1.1-py3-none-any.whl

Download URL gpusitter-2.1.1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db3ecd8c3b61284d4162cac61732eb1afb1505e4b33100d76d99fa739cfad2c2
BLAKE2b-256 checksum
How to use checksums
d9fead04d63675273fc18a1a03eafc67732a191fa89af3182b25c8c431f0154f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Security for gpusitter 2.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page