vastai-local-dev-loop

Featured

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".

AI & Automation 2,944 stars 440 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 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, "gpu_name": "RTX_4090", "gpu_ram": 24, "dph_total": 0.22, "reliability2": 0.99, "inet_down": 500, "ssh_host": "te...

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