usage: vast.py [-h] [--url URL] [--raw] [--explain] [--api-key API_KEY]
command ...
positional arguments:
command command to run. one of:
help print this help message
change bid Change the bid price for a spot/interruptible instance
copy Copy directories between instances and/or local
cancel copy Cancel a remote copy in progress, specified by DST id
create instance Create a new instance
create subaccount Create a subaccount
destroy instance Destroy an instance (irreversible, deletes data)
execute Execute a (constrained) remote command on a machine
label instance Assign a string label to an instance
logs Get the logs for an instance
prepay instance Deposit credits into reserved instance.
reboot instance Reboot (stop/start) an instance
start instance Start a stopped instance
stop instance Stop a running instance
search offers Search for instance types using custom query
ssh-url ssh url helper
scp-url scp url helper
show earnings Get machine earning history reports
show invoices Get billing history reports
show instances Display user's current instances
show ipaddrs Display user's history of ip addresses
show machines [Host] Show hosted machines
show user Get current user data
show subaccounts Get current subaccounts
transfer credit Transfer credits to another account
generate pdf-invoices
list machine [Host] list a machine for rent
unlist machine [Host] Unlist a listed machine
remove defjob [Host] Delete default jobs
set defjob [Host] Create default jobs for a machine
set min-bid [Host] Set the minimum bid/rental price for a machine
schedule maint [Host] Schedule upcoming maint window
reset api-key Reset your api-key (get new key from website).
set api-key Set api-key (get your api-key from the console/CLI)
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Use 'vast COMMAND --help' for more info about a command
Cancel a remote copy in progress, specified by DST id
usage: ./vast cancel copy DST
positional arguments:
dst instance_id:/path to target of copy operation.
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Use this command to cancel any/all current remote copy operations copying to a specific named instance, given by DST.
Examples:
vast cancel copy 12371
The first example cancels all copy operations currently copying data into instance 12371
Copy directories between instances and/or local
usage: ./vast copy SRC DST
positional arguments:
src instance_id:/path to source of object to copy.
dst instance_id:/path to target of copy operation.
options:
-h, --help show this help message and exit
-i IDENTITY, --identity IDENTITY
Location of ssh private key
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Copies a directory from a source location to a target location. Each of source and destination
directories can be either local or remote, subject to appropriate read and write
permissions required to carry out the action. The format for both src and dst is [instance_id:]path.
Examples:
vast copy 6003036:/workspace/ 6003038:/workspace/
vast copy 11824:/data/test data/test
vast copy data/test 11824:/data/test
The first example copy syncs all files from the absolute directory '/workspace' on instance 6003036 to the directory '/workspace' on instance 6003038.
The second example copy syncs the relative directory 'data/test' on the local machine from '/data/test' in instance 11824.
The third example copy syncs the directory '/data/test' in instance 11824 from the relative directory 'data/test' on the local machine.
Create a new instance
usage: ./vast create instance id [OPTIONS] [--args ...]
positional arguments:
id id of instance type to launch
options:
-h, --help show this help message and exit
--price PRICE per machine bid price in $/hour
--disk DISK size of local disk partition in GB
--image IMAGE docker container image to launch
--login LOGIN docker login arguments for private repo
authentication, surround with ''
--label LABEL label to set on the instance
--onstart ONSTART filename to use as onstart script
--onstart-cmd ONSTART_CMD
contents of onstart script as single argument
--ssh Launch as an ssh instance type.
--jupyter Launch as a jupyter instance instead of an ssh
instance.
--direct Use (faster) direct connections for jupyter & ssh.
--jupyter-dir JUPYTER_DIR
For runtype 'jupyter', directory in instance to use to
launch jupyter. Defaults to image's working directory.
--jupyter-lab For runtype 'jupyter', Launch instance with jupyter
lab.
--lang-utf8 Workaround for images with locale problems: install
and generate locales before instance launch, and set
locale to C.UTF-8.
--python-utf8 Workaround for images with locale problems: set
python's locale to C.UTF-8.
--env ENV env variables and port mapping options, surround with
''
--args ... list of arguments passed to container ENTRYPOINT.
Onstart is recommended for this purpose.
--create-from CREATE_FROM
Existing instance id to use as basis for new instance.
Instance configuration should usually be identical, as
only the difference from the base image is copied.
--force Skip sanity checks when creating from an existing
instance
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Examples:
vast create instance 384827 --image bobsrepo/pytorch:latest --login '-u bob -p 9d8df!fd89ufZ docker.io' --jupyter --direct --env '-e TZ=PDT -e XNAME=XX4 -p 22:22 -p 8080:8080' --disk 20
vast create instance 344521 --image anthonytatowicz/eth-cuda-miner --disk 20 --args -U -S us-west1.nanopool.org:9999 -O 0x5C9314b28Fbf25D1d054a9184C0b6abF27E20d95 --farm-recheck 200
Create a subaccount
usage: ./vast create subaccount --email EMAIL --username USERNAME --password PASSWORD --type TYPE
options:
-h, --help show this help message and exit
--email EMAIL email address to use for login
--username USERNAME username to use for login
--password PASSWORD password to use for login
--type TYPE host/client
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Destroy an instance (irreversible, deletes data)
usage: ./vast destroy instance id [-h] [--api-key API_KEY] [--raw]
positional arguments:
id id of instance to delete
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Execute a (constrained) remote command on a machine
usage: ./vast execute ID COMMAND
positional arguments:
ID id of instance to execute on
COMMAND bash command surrounded by single quotes
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
examples:
./vast execute 99999 'ls -l -o -r'
./vast execute 99999 'rm -r home/delete_this.txt'
./vast execute 99999 'du -d2 -h'
available commands:
ls List directory contents
rm Remote files or directories
du Summarize device usage for a set of files
usage: ./vast generate pdf_invoices [OPTIONS]
options:
-h, --help show this help message and exit
-q, --quiet only display numeric ids
-s START_DATE, --start_date START_DATE
start date and time for report. Many formats accepted
(optional)
-e END_DATE, --end_date END_DATE
end date and time for report. Many formats accepted
(optional)
-c, --only_charges Show only charge items.
-p, --only_credits Show only credit items.
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Assign a string label to an instance
usage: ./vast label instance <id> <label>
positional arguments:
id id of instance to label
label label to set
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Get the logs for an instance
usage: ./vast logs [OPTIONS] INSTANCE_ID
positional arguments:
INSTANCE_ID id of instance
options:
-h, --help show this help message and exit
--tail TAIL Number of lines to show from the end of the logs (default
'1000')
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Deposit credits into reserved instance.
usage: ./vast prepay instance <id> <amount>
positional arguments:
id id of instance to prepay for
amount amount of instance credit prepayment (default discount
func of 0.2 for 1 month, 0.3 for 3 months)
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Reboot (stop/start) an instance
usage: ./vast reboot instance <id> [--raw]
positional arguments:
id id of instance to reboot
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Reset your api-key (get new key from website).
usage: ./vast reset api-key
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
scp url helper
usage: ./vast scp-url
options:
-h, --help show this help message and exit
--id ID id of instance
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Search for instance types using custom query
usage: ./vast search offers [--help] [--api-key API_KEY] [--raw] <query>
positional arguments:
query Query to search for. default: 'external=false
rentable=true verified=true', pass -n to ignore
default
options:
-h, --help show this help message and exit
-t TYPE, --type TYPE Show 'bid'(interruptible) or 'on-demand' offers.
default: on-demand
-i, --interruptible Alias for --type=bid
-b, --bid Alias for --type=bid
-d, --on-demand Alias for --type=on-demand
-n, --no-default Disable default query
--disable-bundling Show identical offers. This request is more heavily
rate limited.
--storage STORAGE Amount of storage to use for pricing, in GiB.
default=5.0GiB
-o ORDER, --order ORDER
Comma-separated list of fields to sort on. postfix
field with - to sort desc. ex: -o
'num_gpus,total_flops-'. default='score-'
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Query syntax:
query = comparison comparison...
comparison = field op value
field = <name of a field>
op = one of: <, <=, ==, !=, >=, >, in, notin
value = <bool, int, float, etc> | 'any'
note: to pass '>' and '<' on the command line, make sure to use quotes
note: to encode a string query value (ie for gpu_name), replace any spaces ' ' with underscore '_'
Examples:
./vast search offers 'compute_cap > 610 total_flops < 5 datacenter=true'
./vast search offers 'reliability > 0.99 num_gpus>=4 verified=false' -o 'num_gpus-'
./vast search offers 'rentable = any'
./vast search offers 'reliability > 0.98 num_gpus=1 gpu_name=RTX_3090'
Available fields:
Name Type Description
bw_nvlink float bandwidth NVLink
compute_cap: int cuda compute capability*100 (ie: 650 for 6.5, 700 for 7.0)
cpu_cores: int # virtual cpus
cpu_cores_effective: float # virtual cpus you get
cpu_ram: float system RAM in gigabytes
cuda_vers: float cuda version
datacenter: bool show only datacenter offers
direct_port_count int open ports on host's router
disk_bw: float disk read bandwidth, in MB/s
disk_space: float disk storage space, in GB
dlperf: float DL-perf score (see FAQ for explanation)
dlperf_usd: float DL-perf/$
dph: float $/hour rental cost
driver_version string driver version in use on a host.
duration: float max rental duration in days
external: bool show external offers in addition to datacenter offers
flops_usd: float TFLOPs/$
geolocation: string Two letter country code. Works with operators =, !=, in, not in (e.g. geolocation not in [XV,XZ])
gpu_mem_bw: float GPU memory bandwidth in GB/s
gpu_name: string GPU model name (no quotes, replace spaces with underscores, ie: RTX_3090 rather than 'RTX 3090')
gpu_ram: float GPU RAM in GB
gpu_frac: float Ratio of GPUs in the offer to gpus in the system
gpu_display_active: bool True if the GPU has a display attached
has_avx: bool CPU supports AVX instruction set.
id: int instance unique ID
inet_down: float internet download speed in Mb/s
inet_down_cost: float internet download bandwidth cost in $/GB
inet_up: float internet upload speed in Mb/s
inet_up_cost: float internet upload bandwidth cost in $/GB
machine_id int machine id of instance
min_bid: float current minimum bid price in $/hr for interruptible
num_gpus: int # of GPUs
pci_gen: float PCIE generation
pcie_bw: float PCIE bandwidth (CPU to GPU)
reliability: float machine reliability score (see FAQ for explanation)
rentable: bool is the instance currently rentable
rented: bool is the instance currently rented
storage_cost: float storage cost in $/GB/month
total_flops: float total TFLOPs from all GPUs
verified: bool is the machine verified
Set api-key (get your api-key from the console/CLI)
usage: ./vast set api-key APIKEY
positional arguments:
new_api_key Api key to set as currently logged in user
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Get machine earning history reports
usage: ./vast show earnings [OPTIONS]
options:
-h, --help show this help message and exit
-q, --quiet only display numeric ids
-s START_DATE, --start_date START_DATE
start date and time for report. Many formats accepted
-e END_DATE, --end_date END_DATE
end date and time for report. Many formats accepted
-m MACHINE_ID, --machine_id MACHINE_ID
Machine id (optional)
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Display user's current instances
usage: ./vast show instances [--api-key API_KEY] [--raw]
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Get billing history reports
usage: ./vast show invoices [OPTIONS]
options:
-h, --help show this help message and exit
-q, --quiet only display numeric ids
-s START_DATE, --start_date START_DATE
start date and time for report. Many formats accepted
(optional)
-e END_DATE, --end_date END_DATE
end date and time for report. Many formats accepted
(optional)
-c, --only_charges Show only charge items.
-p, --only_credits Show only credit items.
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Display user's history of ip addresses
usage: ./vast show ipaddrs [--api-key API_KEY] [--raw]
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Get current subaccounts
usage: ./vast show subaccounts [OPTIONS]
options:
-h, --help show this help message and exit
-q, --quiet display subaccounts from current user
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Get current user data
usage: ./vast show user [OPTIONS]
options:
-h, --help show this help message and exit
-q, --quiet display information about user
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
ssh url helper
usage: ./vast ssh-url
options:
-h, --help show this help message and exit
--id ID id of instance
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Start a stopped instance
usage: ./vast start instance <id> [--raw]
positional arguments:
id id of instance to start/restart
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Stop a running instance
usage: ./vast stop instance [--raw] <id>
positional arguments:
id id of instance to stop
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Transfer credits to another account
usage: ./vast transfer credit RECIPIENT AMOUNT
positional arguments:
recipient email of recipient account
amount $dollars of credit to transfer
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Transfer (amount) credits to account with email (recipient).
[Host] list a machine for rent
usage: ./vast list machine id [--price_gpu PRICE_GPU] [--price_inetu PRICE_INETU] [--price_inetd PRICE_INETD] [--api-key API_KEY]
positional arguments:
id id of machine to list
options:
-h, --help show this help message and exit
-g PRICE_GPU, --price_gpu PRICE_GPU
per gpu rental price in $/hour (price for active
instances)
-s PRICE_DISK, --price_disk PRICE_DISK
storage price in $/GB/month (price for inactive
instances), default: $0.15/GB/month
-u PRICE_INETU, --price_inetu PRICE_INETU
price for internet upload bandwidth in $/GB
-d PRICE_INETD, --price_inetd PRICE_INETD
price for internet download bandwidth in $/GB
-r DISCOUNT_RATE, --discount_rate DISCOUNT_RATE
Max long term prepay discount rate fraction, default:
0.4
-m MIN_CHUNK, --min_chunk MIN_CHUNK
minimum amount of gpus
-e END_DATE, --end_date END_DATE
unix timestamp of the available until date (optional)
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
[Host] Delete default jobs
usage: vast.py remove defjob [-h] [--url URL] [--raw] [--explain]
[--api-key API_KEY]
id
positional arguments:
id id of machine to remove default instance from
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
[Host] Schedule upcoming maint window
usage: ./vast schedule maintenance id [--sdate START_DATE --duration DURATION]
positional arguments:
id id of machine to schedule maintenance for
options:
-h, --help show this help message and exit
--sdate SDATE maintenance start date in unix epoch time (UTC seconds)
--duration DURATION maintenance duration in hours
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Example: ./vast.py schedule maint 8207 --sdate 1677562671 --duration 0.5
[Host] Create default jobs for a machine
usage: ./vast set defjob id [--api-key API_KEY] [--price_gpu PRICE_GPU] [--price_inetu PRICE_INETU] [--price_inetd PRICE_INETD] [--image IMAGE] [--args ...]
positional arguments:
id id of machine to launch default instance on
options:
-h, --help show this help message and exit
--price_gpu PRICE_GPU
per gpu rental price in $/hour
--price_inetu PRICE_INETU
price for internet upload bandwidth in $/GB
--price_inetd PRICE_INETD
price for internet download bandwidth in $/GB
--image IMAGE docker container image to launch
--args ... list of arguments passed to container launch
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
[Host] Set the minimum bid/rental price for a machine
usage: ./vast set min_bid id [--price PRICE]
positional arguments:
id id of machine to set min bid price for
options:
-h, --help show this help message and exit
--price PRICE per gpu min bid price in $/hour
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
Change the current min bid price of machine id to PRICE.
[Host] Show hosted machines
usage: ./vast show machines [OPTIONS]
options:
-h, --help show this help message and exit
-q, --quiet only display numeric ids
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key
[Host] Unlist a listed machine
usage: ./vast unlist machine <id>
positional arguments:
id id of machine to unlist
options:
-h, --help show this help message and exit
--url URL server REST api url
--raw output machine-readable json
--explain output verbose explanation of mapping of CLI calls to
HTTPS API endpoints
--api-key API_KEY api key. defaults to using the one stored in
~/.vast_api_key