vastai-local-dev-loop
Configure Vast.ai local development with testing and fast iteration. Use when setting up a development environment, testing instance provisioning, or building a fast iteration cycle for GPU workloads. Trigger with phrases like "vastai dev setup", "vastai local development", "vastai dev environment", "develop with vastai". '
npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill vastai-local-dev-loop --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 Local Dev Loop ## Overview Set up a fast, reproducible local development workflow for Vast.ai GPU workloads. Test Docker images locally, mock API responses for CI, and minimize cloud GPU costs during development. ## Prerequisites - Completed `vastai-install-auth` setup - Docker installed locally - Python 3.8+ with pytest ## Instructions ### Step 1: Project Structure ``` vastai-project/ src/ vastai_client.py # API client wrapper job_runner.py # Job orchestration logic instance_manager.py # Instance lifecycle management docker/ Dockerfile # GPU workload image requirements.txt # Python dependencies for GPU job tests/ test_client.py # Unit tests with mocked API test_job_runner.py # Integration tests conftest.py # Shared fixtures and mocks scripts/ test-connection.sh # Quick API verification benchmark-gpu.py # GPU benchmark script .env.development # Dev API key (low spending limit) .env.production # Prod API key (gitignored) ``` ### Step 2: Mock the Vast.ai API for Testing ```python # tests/conftest.py import pytest from unittest.mock import MagicMock @pytest.fixture def mock_vast_client(): client = MagicMock() client.search_offers.return_value = { "offers": [ {"id": 12345, "g
- Overview
- Prerequisites
- Instructions
- Step 1: Project Structure
- Step 2: Mock the Vast.ai API for Testing
- Step 3: Test Docker Images Locally
- Step 4: Quick Connection Test Script
- Step 5: Development Workflow
- Output
- Error Handling
- Resources
- Next Steps
- Examples
Build and test your GPU image locally (CPU mode)
docker build -t my-training:dev -f docker/Dockerfile .
docker run --rm my-training:dev python -c "import torch; print('OK')"
Test training script in CPU mode
docker run --rm -v $(pwd)/data:/workspace/data my-training:dev \
python train.py --epochs 1 --batch-size 4 --device cpu --dry-run
set -euo pipefail
echo "Testing Vast.ai connection..."
vastai show user 2>/dev/null && echo " CLI auth: OK" || echo " CLI auth: FAIL"
echo " Balance: \$$BALANCE"What does the vastai-local-dev-loop skill do?
Configure Vast.ai local development with testing and fast iteration. Use when setting up a development environment, testing instance provisioning, or building a fast iteration cycle for GPU workloads. Trigger with phrases like "vastai dev setup", "vastai local development", "vastai dev environment", "develop with vastai". '
How do I install it?
Run `npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill vastai-local-dev-loop --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.