Skip to main content

gpu-waiter

1. Overview

a gpu device moniter could automaticly run command if device available, just for nvidia gpu.

2. Install & Usage

2.1 install

pip install gpu-waiter

2.2 usage

$ waiter -g 2 -m 40G ls -alh /usr/local
$ waiter -g 2 -m 40G -c ls -alh /usr/local
$ waiter -g 2 -m 40G -c "ls -alh /usr/local"
$ waiter -c "ls -alh /usr/local" -g 2 -m 40G

$ waiter -h
usage: waiter [-h] [-c CMD] [-g GPU] [-m MEM] [-s] [-t TIME] [-vvv]

options:
  -h, --help            show this help message and exit
  -c CMD, --cmd CMD     command to run; -c could to be not specified;
                        -c could be ignored but command should be posed
                        at the end of shell sentence; command could be
                        not string only if -c is ignored.
  -g GPU, --gpu GPU     amount of gpu required.
  -m MEM, --mem MEM     memory size required.
  -s, --single_user     not use gpu if already has user.
  -t TIME, --time TIME  time of peried between check.
  -vvv, --verbose       dump all log.
#/bin/python3
from gpu_waiter import Tasker, Waiter
from gpu_waiter import NVGPU

if __name__ == "__main__":
    nv = NVGPU(2, "23GiB", False)
    nv.check()

    task = Tasker(
        [
            "ls",
            "-alh",
            "/usr/local/",
        ],
        msg_level=1,
        devices=nv
    )

    wt = Waiter(3, task)
    wt.do_wait()
    
    wt = Waiter(3)
    wt.add_task(task)
    wt.do_wait()

3. Develop

git clone https://github.com/lijunjie2232/gpu_waiter.git
cd gpu_waiter
pip install -e .

Metadata

Release files for gpu-waiter 0.1.5

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

Source distribution (sdist)

Source distribution for gpu-waiter 0.1.5
File Size Uploaded Provenance
gpu_waiter-0.1.5.tar.gz 11.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for gpu-waiter 0.1.5
File Interpreter ABI Platform
gpu_waiter-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 24.4 kB

Release files / gpu_waiter-0.1.5.tar.gz

Download URL gpu_waiter-0.1.5.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0103385585d682e6d5698cbb54adb5a0158892f022ec66827c88d0812b8c4ccf
BLAKE2b-256 checksum
How to use checksums
f2f48d3269b94b0f1219b82841ea8e77192ee33a2daec9691381b3f343f3a2e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / gpu_waiter-0.1.5-py3-none-any.whl

Download URL gpu_waiter-0.1.5-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e472c30680d09626c3a912b100e1d7d048a42c5a3a4445ec65868ce75f63ae93
BLAKE2b-256 checksum
How to use checksums
7d3e6cd6138bdf76d8ff5531a4dd367c27eb236df0e8afa3b92f6d2aac24b51f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Security for gpu-waiter 0.1.5

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.

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