Skip to content

Commit 5812f89

Browse files
abrichrclaude
andcommitted
feat(cloud): add Vast.ai and Modal GPU providers
Vast.ai (~$0.17/hr A10): SSH+rsync marketplace model with full CLI (list, launch, terminate, train) matching lambda_labs.py pattern. Includes GPU search, --gpu-wait retry, auto-convert --demo-dir flow. Modal ($30/mo free, $1.10/hr A10G): Python-native cloud with zero-ops training via decorated functions and Modal Volumes for data transfer. CLI: train, status, download, list-volumes. Both support the same --demo-dir end-to-end pipeline as Lambda Labs. 53 new tests (34 Vast.ai + 19 Modal), all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a5487bb commit 5812f89

7 files changed

Lines changed: 3138 additions & 1 deletion

File tree

.env.example

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,37 @@ OPENAI_API_KEY=your-openai-api-key-here
1414
#
1515
LAMBDA_API_KEY=your-lambda-api-key-here
1616

17+
# =============================================================================
18+
# Vast.ai (Cloud GPU Marketplace — cheapest GPUs)
19+
# =============================================================================
20+
# Get your API key at: https://cloud.vast.ai/api/
21+
#
22+
# Usage:
23+
# python -m openadapt_ml.cloud.vast_ai list # See available GPUs
24+
# python -m openadapt_ml.cloud.vast_ai launch # Launch cheapest A10
25+
# python -m openadapt_ml.cloud.vast_ai terminate <id> # Stop billing!
26+
#
27+
VAST_API_KEY=your-vast-api-key-here
28+
29+
# =============================================================================
30+
# Modal (Serverless Cloud GPU for training)
31+
# =============================================================================
32+
# Modal is a Python-native serverless platform with per-second billing.
33+
# $30/month free credits. No SSH or instances to manage.
34+
#
35+
# Setup:
36+
# pip install modal
37+
# modal token set # Authenticate (opens browser)
38+
#
39+
# Usage:
40+
# python -m openadapt_ml.cloud.modal_cloud train --bundle /path/to/bundle
41+
# python -m openadapt_ml.cloud.modal_cloud status
42+
# python -m openadapt_ml.cloud.modal_cloud download
43+
#
44+
# Auth is usually via `modal token set` CLI. Alternatively, set these env vars:
45+
# MODAL_TOKEN_ID=your-modal-token-id
46+
# MODAL_TOKEN_SECRET=your-modal-token-secret
47+
1748
# Google Gemini API (for GeminiGrounder element detection)
1849
# Get your key via one of these methods:
1950
#

openadapt_ml/cloud/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Cloud GPU providers for training."""
22

33
from openadapt_ml.cloud.lambda_labs import LambdaLabsClient
4+
from openadapt_ml.cloud.vast_ai import VastAIClient
45

5-
__all__ = ["LambdaLabsClient"]
6+
__all__ = ["LambdaLabsClient", "VastAIClient"]

0 commit comments

Comments
 (0)