Skip to content
VerbiflowPublic

About

Provider-agnostic CLI to check live cloud GPU availability, rent, SSH/SCP by name, and terminate (Lambda, RunPod, Vast.ai, Modal)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpu-rent

Provider-agnostic CLI to check live cloud GPU availability, rent a machine, SSH/SCP by name, and tear it down cleanly.

Zero runtime dependencies (Python 3.10+ stdlib only). Works across Lambda Cloud, RunPod, Vast.ai, and Modal using your existing local API keys.

Why

Renting a quick GPU usually means clicking around dashboards, guessing which regions actually have stock right now, copying IPs, remembering SSH key names, and forgetting to terminate instances.

gpu-rent list                    # LIVE available GPUs & prices right now (cheapest first)
gpu-rent up rtx6000 --name dev   # rent, wait for boot + SSH ready
gpu-rent ssh dev                 # SSH in by name (auto-matches your SSH key)
gpu-rent scp ./data dev:/tmp/    # copy files by name
gpu-rent down dev                # terminate and confirm via API

Live availability vs. catalog

By default, gpu-rent list only shows GPUs with live, verified capacity right now:

  • Lambda Cloud: queries /api/v1/instance-types and filters strictly to types with non-empty regions_with_capacity_available.
  • RunPod: queries live lowestPrice.stockStatus (high / medium / low).
  • Vast.ai: queries live rentable verified marketplace offers.
  • Modal: serverless GPUs have no live stock API, so they are excluded by default — pass --include-serverless or --provider modal when you want them.

Pass --all to also see sold-out instance types.

Install

# With uv (recommended)
uv tool install git+https://github.com/Verbiflow/gpu-rent

# Or pip
pip install git+https://github.com/Verbiflow/gpu-rent

# Or editable local checkout
pip install -e .

Setup credentials

Add any provider with one command (stored locally in ~/.config/gpu-rent/credentials.json with chmod 600 and verified immediately):

gpu-rent setup --provider lambda --apikey <YOUR_KEY>
gpu-rent setup --provider runpod --apikey <YOUR_KEY>
gpu-rent setup --provider vast   --apikey <YOUR_KEY>
gpu-rent setup --provider modal                      # runs modal token new

Omit --apikey to enter the key at a hidden prompt so it stays out of shell history.

gpu-rent also auto-discovers existing environment variables and standard provider files:

Provider Env var Or local file
Lambda Cloud LAMBDA_API_KEY ~/.config/gpu-rent/credentials.json or ~/.lambda_api_key
RunPod RUNPOD_API_KEY ~/.config/gpu-rent/credentials.json or ~/.runpod/config.toml
Vast.ai VAST_API_KEY ~/.config/gpu-rent/credentials.json or ~/.vast_api_key
Modal MODAL_TOKEN_ID + MODAL_TOKEN_SECRET ~/.modal.toml (via modal token new)

Check what is detected:

gpu-rent providers

Optional environment variables:

  • GPU_RENT_SSH_KEY — path to your private SSH key (defaults to ~/.ssh/id_ed25519). The matching public key on Lambda is auto-detected.
  • GPU_RENT_LAMBDA_KEY — override the Lambda SSH key name explicitly.

Commands

gpu-rent providers                               # Show configured providers
gpu-rent list [filter] [--all] [--json]          # Live available GPUs sorted by $/hr
gpu-rent list --include-serverless               # Include Modal serverless catalog
gpu-rent list --provider lambda rtx              # Filter by provider and GPU name
gpu-rent ps                                      # Show all running GPUs across all configured providers (+ $/hr burn)
gpu-rent running [--provider lambda] [--json]    # Alias for `ps` (`status` / `active` also work)
gpu-rent up <gpu> [--name NAME] [--region REG]   # Rent a GPU and wait until SSH works
gpu-rent up modal:L4 --cmd "nvidia-smi"          # Run a one-shot job on Modal
gpu-rent ssh <name|id> [-- CMD...]               # SSH in or run a command
gpu-rent ssh <name> -L 8801:localhost:8801       # Port-forward
gpu-rent scp <src> <dst>                         # Copy files (use <name>:/path)
gpu-rent down <name|id>                          # Terminate and verify gone
gpu-rent down --all                              # Terminate all running instances

License

MIT

About

Provider-agnostic CLI to check live cloud GPU availability, rent, SSH/SCP by name, and terminate (Lambda, RunPod, Vast.ai, Modal)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages