| name | vastai-ci-integration |
| description | Configure Vast.ai CI/CD integration with GitHub Actions and automated GPU testing.
Use when setting up automated testing on GPU instances,
or integrating Vast.ai provisioning into CI/CD pipelines.
Trigger with phrases like "vastai CI", "vastai github actions",
"vastai automated testing", "vastai pipeline".
|
| allowed-tools | Read, Write, Edit, Bash(vastai:*), Grep |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","vast-ai","ci-cd"] |
| compatibility | Designed for Claude Code |
Vast.ai CI Integration
Overview
Integrate Vast.ai GPU provisioning into CI/CD pipelines. Run GPU-accelerated tests, model validation, and benchmarks as part of your automated workflow using GitHub Actions with the Vast.ai CLI.
Prerequisites
- GitHub repository with Actions enabled
VASTAI_API_KEY stored as GitHub Actions secret
- Docker image for GPU workload published to a registry
Instructions
Step 1: GitHub Actions Workflow
name: GPU Tests
on:
push:
branches: [main]
pull_request:
jobs:
gpu-test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install Vast.ai CLI
run: |
pip install vastai
vastai set api-key ${{ secrets.VASTAI_API_KEY }}
- name: Provision GPU Instance
id: provision
run: |
# Search for cheapest reliable GPU
OFFER_ID=$(vastai search offers \
'num_gpus=1 gpu_ram>=8 reliability>0.95 dph_total<=0.25' \
--order dph_total --raw --limit 1 \
| python3 -c "import sys,json; print(json.load(sys.stdin)[0]['id'])")
INSTANCE_ID=$(vastai
[ ]