Launch a GPU Instance on Vast.ai

VerifiedSafe

Launches a GPU instance on Vast.ai given an offer ID or requirements (GPU count, Docker image, disk size). Helps quickly spin up a machine for training, inference, or development without manual infrastructure setup.

Sby Skills Guide Bot
Data & AIIntermediate
406/2/2026
Claude Code
#vast-ai#gpu-instance#cloud-computing#ssh#docker

Recommended for

Our review

Guides the user through launching a GPU instance on Vast.ai with full configuration.

Strengths

  • Automates offer search and selection
  • Supports SSH, Jupyter, and Jupyter Lab connections
  • Allows configuring Docker image, disk, volumes, and environment variables
  • Handles spot instances with bidding

Limitations

  • Requires a Vast.ai account and configured CLI tool
  • Does not handle complex multi-node setups
  • Interruptible instances can lose work if preempted
When to use it

When you need a GPU machine quickly for training, inference, or development.

When not to use it

For long-term persistent servers or tasks that do not require a GPU.

Security analysis

Safe
Quality score85/100

The skill only uses the Vast.ai CLI for its intended purpose (searching offers, creating instances, checking status, obtaining SSH URLs). There are no destructive, obfuscated, or exfiltrating commands. It does not pipe untrusted data into interpreters or disable safety mechanisms.

No concerns found

Examples

Launch a basic GPU instance
Launch a GPU instance on Vast.ai with a PyTorch image and SSH access.
Find and launch a low-cost GPU
Find a cheap GPU instance on Vast.ai with at least 16GB VRAM and 100GB disk, then launch it with Jupyter Lab.
Launch with volume and custom script
Create a Vast.ai GPU instance using the vllm image, attach an existing volume at /data, and run a startup script.

name: launch-instance description: "Launch a GPU instance on Vast.ai. Use when the user wants to create, start, or spin up a new GPU machine for training, inference, or development." argument-hint: "[offer-id or requirements]" disable-model-invocation: true allowed-tools: Bash

Launch a Vast.ai GPU Instance

Guide the user through launching a GPU instance on Vast.ai.

User Request

$ARGUMENTS

Instructions

Step 1: Determine the Offer

If the user provided an offer ID (number), use it directly.

If they described requirements, search first:

vastai search offers '<query>' -o 'dph_total'

Present top options and ask the user to pick one.

Step 2: Gather Configuration

| Setting | Flag | Default | |---------|------|---------| | Docker image | --image | Ask user (suggest pytorch/pytorch) | | Disk size | --disk | 64 GB | | Access method | --ssh / --jupyter / --jupyter-lab | --ssh | | Direct connect | --direct | No (not all machines support it) | | Startup script | --onstart-cmd | None | | Environment/ports | --env | None | | Pricing | --bid_price | On-demand (no flag) | | Label | --label | None | | Template | --template_hash | None | | Volume | --create-volume / --link-volume | None | | Mount path | --mount-path | None | | Entrypoint | --entrypoint | Container default | | Container user | --user | root |

Common images: pytorch/pytorch, nvidia/cuda:12.1.0-devel-ubuntu22.04, vllm/vllm-openai:latest, tensorflow/tensorflow:latest-gpu

Step 3: Launch

vastai create instance <OFFER_ID> \
  --image <IMAGE> \
  --disk <GB> \
  --ssh \
  [--env '<DOCKER_OPTS>'] \
  [--onstart-cmd '<SCRIPT>'] \
  [--label '<NAME>']

Alternatively, auto-select an offer:

vastai launch instance -g <GPU_NAME> -n <NUM_GPUS> -i <IMAGE> -d <DISK> --ssh

Step 4: Verify & Connect

After creation succeeds (note the new_contract instance ID):

# Wait for running status
vastai show instances

# Get SSH connection
vastai ssh-url <INSTANCE_ID>

Provide the user with the SSH command or Jupyter URL.

Step 5: Volume Setup (if needed)

# With new volume
vastai create instance <OFFER_ID> --image <IMG> --ssh --disk 64 \
  --create-volume <VOLUME_OFFER_ID> --volume-size 100 --mount-path /root/data

# With existing volume
vastai create instance <OFFER_ID> --image <IMG> --ssh --disk 64 \
  --link-volume <VOLUME_ID> --mount-path /root/data

Safety

  • Always confirm offer ID and $/hr cost before creating
  • Remind user to vastai destroy instance <ID> when done
  • Warn about interruptible instances losing work if preempted
  • For spot: use --bid_price — if bid is too low, instance won't start
Related skills