Skip to content

reproducing console default create instance in CLI #101

@enpassanty

Description

@enpassanty

i've been trying to automate instance creation in python Jupyter with no success. the CLI command below creates an instance if the bid is right but it doesnt have a jupyter launch button, only SSH:

command = f"""vastai create instance {id} --image pytorch/pytorch:2.2.0-cuda12.1-cudnn8-devel --env '-e DATA_DIRECTORY=/workspace/ -e JUPYTER_DIR=/' --onstart-cmd "env | grep _ >> /etc/environment;" --disk 100--price 0.5 --ssh --jupyter --direct"""

result = subprocess.run(command, capture_output=True, text=True, check=True, shell=True)

any idea what im doing worng?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions