google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
vastai-migration-deep-dive
Migrate GPU workloads to or from Vast.ai, or between GPU providers.
Full skill instructions
!vastai --version 2>/dev/null || echo 'vastai CLI not installed'
!pip show vastai 2>/dev/null | grep Version || echo 'N/A'
Migrate GPU workloads to Vast.ai from hyperscaler providers (AWS, GCP, Azure) or other GPU clouds (Lambda, RunPod, CoreWeave). Also covers migrating between GPU types on Vast.ai and the reverse migration away from Vast.ai.
# Compare your current GPU costs against Vast.ai marketplace prices
PROVIDER_COSTS = {
"aws_p4d.24xlarge": {"gpu": "A100 40GB", "gpus": 8, "hourly": 32.77},
"aws_p3.2xlarge": {"gpu": "V100 16GB", "gpus": 1, "hourly": 3.06},
"gcp_a2-highgpu-1g": {"gpu": "A100 40GB", "gpus": 1, "hourly": 3.67},
"azure_NC24ads_A100_v4": {"gpu": "A100 80GB", "gpus": 1, "hourly": 3.67},
"lambda_1xA100": {"gpu": "A100", "gpus": 1, "hourly": 1.25},
}
VASTAI_TYPICAL = {
"RTX_4090": 0.20,
"A100": 1.50,
"H100_SXM": 3.00,
}
def savings_analysis(current_provider, current_hourly, vastai_gpu, vastai_hourly):
monthly_current = current_hourly * 730 # hours/month
monthly_vastai = vastai_hourly * 730
savings = monthly_current - monthly_vastai
pct = (savings / monthly_current) * 100
print(f"Current ({current_provider}): ${monthly_current:,.0f}/mo")
print(f"Vast.ai ({vastai_gpu}): ${monthly_vastai:,.0f}/mo")
print(f"Savings: ${savings:,.0f}/mo ({pct:.0f}%)")
savings_analysis("AWS p3.2xlarge", 3.06, "RTX_4090", 0.20)
# Output: Savings: $2,088/mo (93%)
# Most Docker images work unchanged on Vast.ai
# Key differences:
# - Vast.ai instances run as root
# - /workspace is the default working directory
# - SSH access (not IAM roles) for authentication
# Adapt your existing Dockerfile
cat << 'DOCKERFILE' > Dockerfile.vastai
FROM your-existing-image:latest
# Vast.ai instances use /workspace by default
WORKDIR /workspace
# Install any Vast.ai-specific tools
RUN pip install boto3 # for S3 checkpoint uploads
# Copy training code
COPY src/ /workspace/src/
COPY configs/ /workspace/configs/
CMD ["python", "src/train.py"]
DOCKERFILE
docker build -t ghcr.io/org/training:vastai -f Dockerfile.vastai .
docker push ghcr.io/org/training:vastai
# On AWS/GCP: IAM roles provide automatic credentials
# On Vast.ai: Pass credentials explicitly via environment variables
# Create instance with env vars for cloud storage access
vastai create instance $OFFER_ID \
--image ghcr.io/org/training:vastai \
--disk 100 \
--env "AWS_ACCESS_KEY_ID=AKIA... AWS_SECRET_ACCESS_KEY=... AWS_DEFAULT_REGION=us-east-1"
#!/bin/bash
set -euo pipefail
echo "Migration Validation Checklist"
# 1. Docker image runs on Vast.ai
vastai create instance $OFFER_ID --image ghcr.io/org/training:vastai --disk 50
# Wait for running...
# 2. GPU access works
ssh -p $PORT root@$HOST "nvidia-smi && python -c 'import torch; print(torch.cuda.is_available())'"
# 3. Cloud storage works
ssh -p $PORT root@$HOST "aws s3 ls s3://your-bucket/ | head -5"
# 4. Training runs and saves checkpoints
ssh -p $PORT root@$HOST "cd /workspace && python src/train.py --epochs 1 --checkpoint-dir /workspace/ckpt"
# 5. Checkpoints uploaded to cloud storage
ssh -p $PORT root@$HOST "aws s3 sync /workspace/ckpt/ s3://your-bucket/ckpt/"
# 6. Clean up
vastai destroy instance $INSTANCE_ID
echo "Migration validation complete"
## Rollback Procedure
1. Stop all Vast.ai instances: `vastai show instances` → `vastai destroy instance ID`
2. Re-provision on original cloud provider
3. Resume training from cloud-stored checkpoint
4. Vast.ai Docker image remains available for future retry
| Factor | AWS/GCP/Azure | Vast.ai |
|---|---|---|
| Pricing | Fixed, premium | Variable, 50-90% cheaper |
| GPU availability | On-demand guaranteed | Marketplace (may sell out) |
| SLA | 99.9% uptime | No SLA (spot instances) |
| IAM roles | Native | Manual credential passing |
| Networking | VPC, private subnets | Public SSH only |
| Storage | EBS/PD attached | Local disk + cloud storage |
| Support | Enterprise support | Community/email |
| Error | Cause | Solution |
|---|---|---|
| Docker image incompatible | Relies on IAM roles or cloud-specific APIs | Pass credentials via env vars |
| CUDA version mismatch | Different CUDA on Vast.ai hosts | Filter by cuda_max_good in search |
| Data transfer too slow | Large dataset over public internet | Stage data in cloud storage, download on instance |
| No matching offers | Specific GPU unavailable | Try alternative GPU type or wait for availability |
Review vastai-reference-architecture for best-practice project structure.
AWS to Vast.ai: Replace p3.2xlarge ($3.06/hr) with RTX 4090 ($0.20/hr) for a 93% cost reduction. Adapt the Dockerfile to pass AWS credentials via env vars for S3 checkpoint access.
Hybrid approach: Use Vast.ai for experimentation and hyperparameter search (cheap GPUs), then run final training on AWS for SLA guarantees.
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.
Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.
Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.
Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.