vastai-core-workflow-b
Execute Vast.ai secondary workflow: multi-instance orchestration, spot recovery, and cost optimization. Use when running distributed training, handling spot preemption, or optimizing GPU spend across multiple instances. Trigger with phrases like "vastai distributed training", "vastai spot recovery", "vastai multi-gpu", "vastai cost optimization". '
npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill vastai-core-workflow-b --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Vast.ai Core Workflow B: Multi-Instance & Cost Optimization ## Overview Secondary workflow for Vast.ai: orchestrate multiple GPU instances for distributed training, implement automatic spot interruption recovery with checkpoint-based resume, and analyze spending to reduce per-job cost. ## Prerequisites - Completed `vastai-core-workflow-a` - Understanding of distributed training (PyTorch DDP, DeepSpeed) - Checkpoint-based training pipeline ## Instructions ### Step 1: Multi-Instance Provisioning ```python import subprocess, json, time from concurrent.futures import ThreadPoolExecutor def provision_cluster(num_nodes, gpu_name="A100", min_vram=80, image=""): """Provision multiple GPU instances for distributed training.""" # Search for matching offers query = (f"num_gpus=1 gpu_name={gpu_name} gpu_ram>={min_vram} " f"reliability>0.98 inet_down>500 rentable=true") result = subprocess.run( ["vastai", "search", "offers", query, "--order", "dph_total", "--raw", "--limit", str(num_nodes * 3)], capture_output=True, text=True, check=True, ) offers = json.loads(result.stdout) if len(offers) < num_nodes: raise RuntimeError(f"Only {len(offers)} offers, need {num_nodes}") # Provision nodes in par
- Overview
- Prerequisites
- Instructions
- Step 1: Multi-Instance Provisioning
- Step 2: Spot Interruption Recovery
- Step 3: Cost Analysis
- Step 4: Destroy Cluster
- Output
- Error Handling
- Resources
- Next Steps
- Examples
What does the vastai-core-workflow-b skill do?
Execute Vast.ai secondary workflow: multi-instance orchestration, spot recovery, and cost optimization. Use when running distributed training, handling spot preemption, or optimizing GPU spend across multiple instances. Trigger with phrases like "vastai distributed training", "vastai spot recovery", "vastai multi-gpu", "vastai cost optimization". '
How do I install it?
Run `npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill vastai-core-workflow-b --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From jeremylongshore/claude-code-plugins-plus-skills, a repository with 2,630 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.