gpu-keepalive-with-keepgpu

Install and operate KeepGPU to maintain GPU availability via VRAM allocation and utilization monitoring.

39|5|Updated May 20, 2025
One-click install
npx skills add https://github.com/Wangmerlyn/KeepGPU --skill gpu-keepalive-with-keepgpu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gpu-keepalive-with-keepgpu
Source: https://github.com/Wangmerlyn/KeepGPU/tree/main/skills/gpu-keepalive-with-keepgpu
Command: npx skills add https://github.com/Wangmerlyn/KeepGPU --skill gpu-keepalive-with-keepgpu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents shared GPUs from being reclaimed or silently shared during preparatory tasks like data preprocessing, debugging, or multi-stage pipeline coordination, ensuring your GPU resources remain available.

Core Features & Use Cases

  • Resource Reservation: Allocates minimal VRAM and issues lightweight CUDA work to signal an "active" device to schedulers.
  • Polite Resource Usage: Uses NVML to monitor utilization and backs off when the GPU is actively in use by another process.
  • Flexible Operation: Supports both blocking CLI mode for manual control and non-blocking service mode for agent workflows.
  • Use Case: When running a long data preprocessing job on a shared cluster, use this Skill to ensure your allocated GPU isn't taken by another user or process while you wait.

Quick Start

Install KeepGPU and start a non-blocking keep-alive session for GPU 0, holding 1GiB of VRAM and backing off if utilization exceeds 25%, by running pip install keep-gpu then keep-gpu start --gpu-ids 0 --vram 1GiB --busy-threshold 25.

Frequently Asked Questions about gpu-keepalive-with-keepgpu

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep a GPU allocated on a shared cluster without running heavy compute jobs?

You can keep a GPU allocated by using KeepGPU to reserve minimal VRAM and issue lightweight CUDA work, which signals active device usage to schedulers without running heavy compute jobs.

What is GPU keepalive and when do I need it for PyTorch data preprocessing?

GPU keepalive is a technique that maintains GPU availability during preparatory tasks like data preprocessing by issuing lightweight CUDA work, preventing shared GPUs from being reclaimed by cluster schedulers.

Does the KeepGPU tool support non-blocking agent workflows alongside CLI mode?

Yes, KeepGPU supports both blocking CLI mode for manual control and non-blocking service mode for agent workflows, enabling flexible GPU session control and parameter tuning for VRAM and busy thresholds.

How do I start a keep-alive session for a specific GPU using the command line?

Start a keep-alive session by running `keep-gpu start --gpu-ids 0 --vram 1GiB --busy-threshold 25` after installing the package via pip, specifying the target GPU, VRAM, and utilization backoff threshold.

Do I need PyTorch and nvidia-ml-py installed to monitor GPU telemetry with KeepGPU?

Yes, you need PyTorch installed for platform-specific setup and nvidia-ml-py for GPU telemetry, which KeepGPU uses to monitor utilization and politely back off when the device is actively in use.

Why does the GPU keepalive tool back off when utilization exceeds a certain threshold?

The GPU keepalive tool backs off when utilization exceeds the busy threshold to ensure polite resource usage, using NVML telemetry to detect active processes and avoid interfering with other heavy compute jobs.