def mk_sandbox( app, # modal.App to register the Sandbox with img, # modal.Image for the Sandbox environment timeout:int=600, # auto-terminate after this many seconds):
Call self as a function.
sb = mk_sandbox(app, img); sb
Sandbox()
get_tunnel
def get_tunnel( sb):
Call self as a function.
host,port = get_tunnel(sb); host,port
('r446.modal.host', 37801)
get_pubkey
def get_pubkey():
Call self as a function.
inject_pubkey
def inject_pubkey( sb, pubkey):
Call self as a function.
inject_pubkey(sb, get_pubkey())
start_ssh
def start_ssh( sb):
Call self as a function.
start_ssh(sb)
✔ started ssh service
ssh = _ssh(host,port); ssh
<function __main__._ssh.<locals>.<lambda>(*cmd)>
verify_connection
def verify_connection( ssh):
Verify SSH connection to Sandbox and print system info.
verify_connection(ssh)
系统: Linux
主机名:modal
用户: root
内核: 4.4.0
架构: x86_64
系统类型:GNU/Linux