一键导入
launch-instance
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Manage Vast.ai autoscaling endpoints and worker groups for production deployments. Use when setting up auto-scaling GPU inference, managing worker pools, or deploying services.
Manage Vast.ai GPU instances — show status, start, stop, destroy, SSH, execute commands, view logs, copy files, take snapshots. Use when the user wants to check on, connect to, transfer files, or control their GPU instances.
Manage Vast.ai persistent storage volumes — search, create, delete, clone, and attach volumes to instances. Use for persistent data across instance lifecycles.
Run a job on a Vast.ai GPU instance end-to-end: find a GPU, launch it, execute the job, monitor it, and destroy the instance when done. Use when the user wants to run a training job, inference task, script, or any workload on a remote GPU.
Search for available GPU machines on Vast.ai. Use when looking for GPUs to rent, comparing GPU pricing, or finding machines that match specific requirements.
Set up Vast.ai CLI — configure API key, verify installation, set up SSH keys, and check account. Use when the user needs to get started with Vast.ai or is having authentication issues.
| 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 |
Guide the user through launching a GPU instance on Vast.ai.
$ARGUMENTS
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.
| 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
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
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.
# 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
vastai destroy instance <ID> when done--bid_price — if bid is too low, instance won't start