Skip to main content
Update an existing template.

Signature

VastAI.update_template(
    hash_id: str,
    name: Optional[str] = None,
    image: Optional[str] = None,
    image_tag: Optional[str] = None,
    href: Optional[str] = None,
    repo: Optional[str] = None,
    login: Optional[str] = None,
    env: Optional[str] = None,
    ssh: bool = False,
    jupyter: bool = False,
    direct: bool = False,
    jupyter_dir: Optional[str] = None,
    jupyter_lab: bool = False,
    onstart_cmd: Optional[str] = None,
    search_params: Optional[str] = None,
    no_default: bool = False,
    disk_space: Optional[str] = None,
    readme: Optional[str] = None,
    hide_readme: bool = False,
    desc: Optional[str] = None,
    public: bool = False
) -> dict

Parameters

hash_id
str
required
name
Optional[str]
name of the template
image
Optional[str]
docker container image to launch
image_tag
Optional[str]
docker image tag
href
Optional[str]
link you want to provide
repo
Optional[str]
link to repository
login
Optional[str]
docker login arguments for private repo authentication, surround with ”
env
Optional[str]
Contents of the ‘Docker options’ field
ssh
bool
Launch as an ssh instance type
jupyter
bool
Launch as a jupyter instance instead of an ssh instance
direct
bool
Use (faster) direct connections for jupyter & ssh
jupyter_dir
Optional[str]
For runtype ‘jupyter’, directory in instance to use to launch jupyter
jupyter_lab
bool
For runtype ‘jupyter’, Launch instance with jupyter lab
onstart_cmd
Optional[str]
contents of onstart script as single argument
search_params
Optional[str]
search offers filters
no_default
bool
Disable default search param query args
disk_space
Optional[str]
disk storage space, in GB
readme
Optional[str]
readme string
hide_readme
bool
hide the readme from users
desc
Optional[str]
description string
public
bool
make template available to public

Returns

dict

Example

from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.update_template(hash_id="value")
print(result)