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
6/2/2026
Claude Code
#vast-ai#gpu-instance#cloud-computing#ssh#docker

Recommended for

Automated summary

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

How this analysis is made

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

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/launch-a-gpu-instance-on-vast-ai-mm78no1a/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/launch-a-gpu-instance-on-vast-ai-mm78no1a' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/launch-a-gpu-instance-on-vast-ai-mm78no1a/download' --output '.skill-downloads/launch-a-gpu-instance-on-vast-ai-mm78no1a/SKILL.md.part' && mv '.skill-downloads/launch-a-gpu-instance-on-vast-ai-mm78no1a/SKILL.md.part' '.skill-downloads/launch-a-gpu-instance-on-vast-ai-mm78no1a/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/launch-a-gpu-instance-on-vast-ai-mm78no1a/SKILL.md' && test -s '.skill-downloads/launch-a-gpu-instance-on-vast-ai-mm78no1a/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/launch-instance' && cp -R '.skill-downloads/launch-a-gpu-instance-on-vast-ai-mm78no1a' '.claude/skills/launch-instance'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/launch-a-gpu-instance-on-vast-ai-mm78no1a'

openskills read 'launch-a-gpu-instance-on-vast-ai-mm78no1a'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/launch-a-gpu-instance-on-vast-ai-mm78no1a/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills