Skip to main content
Create instances from a list of offers

Usage

vastai create instances [OPTIONS] ID0 ID1 ID2... [--args ...]

Arguments

ids
integer
required
ids of instance types to launch (returned from search offers)

Options

--template_hash
string
Create instance from template info
--user
string
User to use with docker create. This breaks some images, so only use this if you are certain you need it.
--disk
number
default:"10"
size of local disk partition in GB
--image
string
docker container image to launch
--login
string
docker login arguments for private repo authentication, surround with ”
--label
string
label to set on the instance
--onstart
string
filename to use as onstart script
--onstart-cmd
string
contents of onstart script as single argument
--entrypoint
string
override entrypoint for args launch instance
--ssh
boolean
Launch as an ssh instance type
--jupyter
boolean
Launch as a jupyter instance instead of an ssh instance
--direct
boolean
Use (faster) direct connections for jupyter & ssh
--jupyter-dir
string
For runtype ‘jupyter’, directory in instance to use to launch jupyter. Defaults to image’s working directory
--jupyter-lab
boolean
For runtype ‘jupyter’, Launch instance with jupyter lab
--lang-utf8
boolean
Workaround for images with locale problems: install and generate locales before instance launch, and set locale to C.UTF-8
--python-utf8
boolean
Workaround for images with locale problems: set python’s locale to C.UTF-8
--env
string
env variables and port mapping options, surround with ”
--args
string
list of arguments passed to container ENTRYPOINT. Onstart is recommended for this purpose. (must be last argument)
--force
boolean
Skip sanity checks when creating from an existing instance
--cancel-unavail
boolean
Return error if scheduling fails (rather than creating a stopped instance)
--bid_price
number
(OPTIONAL) create an INTERRUPTIBLE instance with per machine bid price in $/hour
--create-volume
integer
Create a new local volume using an ID returned from the “search volumes” command and link it to the new instance
ID of an existing rented volume to link to the instance during creation. (returned from “show volumes” cmd)
--volume-size
integer
Size of the volume to create in GB. Only usable with —create-volume (default 15GB)
--mount-path
string
The path to the volume from within the new instance container. e.g. /root/volume
--volume-label
string
(optional) A name to give the new volume. Only usable with —create-volume

Global Options

The following options are available for all commands:
OptionDescription
--url URLServer REST API URL
--retry NRetry limit
--rawOutput machine-readable JSON
--explainVerbose explanation of API calls
--api-key KEYAPI key (defaults to ~/.config/vastai/vast_api_key)