vastai-hello-world

Featured

Rent your first GPU instance on Vast.ai and run a workload. Use when starting a new Vast.ai integration, testing your setup, or learning basic Vast.ai GPU rental patterns. Trigger with phrases like "vastai hello world", "vastai example", "vastai quick start", "rent first gpu", "vastai first instance".

AI & Automation 2,940 stars 439 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Vast.ai Hello World ## Overview Rent your first GPU instance on Vast.ai, run a PyTorch workload, and destroy the instance when done. Demonstrates the full lifecycle: search offers, create instance, connect via SSH, run a job, and tear down. ## Prerequisites - Completed `vastai-install-auth` setup - Vast.ai account with credits ($1+ recommended for testing) - SSH key uploaded to Vast.ai (cloud.vast.ai > Account > SSH Keys) ## Instructions ### Step 1: Search for Available GPUs (CLI) ```bash # Find cheap single-GPU offers sorted by price vastai search offers 'num_gpus=1 gpu_ram>=8 inet_down>100 reliability>0.95' \ --order 'dph_total' --limit 5 # Output columns: ID, GPU, VRAM, $/hr, DLPerf, Reliability, Location ``` ### Step 2: Search for Available GPUs (REST API) ```bash curl -s -H "Authorization: Bearer $VASTAI_API_KEY" \ "https://cloud.vast.ai/api/v0/bundles/?q=%7B%22num_gpus%22%3A%7B%22eq%22%3A1%7D%2C%22gpu_ram%22%3A%7B%22gte%22%3A8%7D%2C%22reliability2%22%3A%7B%22gte%22%3A0.95%7D%2C%22rentable%22%3A%7B%22eq%22%3Atrue%7D%7D&order=dph_total&limit=5" \ | jq '.offers[:3] | .[] | {id, gpu_name, num_gpus, gpu_ram, dph_total, reliability2}' ``` ### Step 3: Create an Instance (CLI) ```bash # Replace OFFER_ID with the ID from search results vastai create instance OFFER_ID \ --image pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime \ --disk 20 \ --onstart-cmd "echo 'Instance ready'" ``` ### Step 4: Create an Instance (Python) ```python from vastai_client import VastC...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category