Closed oxysoft closed 2 weeks ago
@oxysoft you can get the port mapping of an instance by using the raw
flag. This returns a json object with all informations:
CLI:
vastai show instance <id> --raw
Python:
from vastai import VastAI
import json
client = VastAI(api_key='1234', raw=True)
instance_raw = client.show_instance(id=instance_id)
print(json.loads(instance_raw))
closed
I am opening ports like this:
--env '-p 8188:8188'
. The real effective port is shown in the console on the website and doesn't appear to be retrievable from this script, which is a problem since I want to automate a lot of separate instances.