# modal


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

------------------------------------------------------------------------

### mk_app

``` python

def mk_app(
    name
):

```

*Call self as a function.*

``` python
app = mk_app('solveit-sandbox'); app
```

    <modal.app.App>

------------------------------------------------------------------------

### mk_img

``` python

def mk_img(
    apts, # system packages to apt-install (list or str)
    pips, # python packages to pip-install (list or str)
):

```

*Call self as a function.*

``` python
img = mk_img('openssh-server', 'ipykernel'); img
```

    Image(<function _Image.pip_install.<locals>.build_dockerfile>)

------------------------------------------------------------------------

### mk_sandbox

``` python

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.*

``` python
sb = mk_sandbox(app, img); sb
```

    Sandbox()

------------------------------------------------------------------------

### get_tunnel

``` python

def get_tunnel(
    sb
):

```

*Call self as a function.*

``` python
host,port = get_tunnel(sb); host,port
```

    ('r446.modal.host', 37801)

------------------------------------------------------------------------

### get_pubkey

``` python

def get_pubkey(
    
):

```

*Call self as a function.*

------------------------------------------------------------------------

### inject_pubkey

``` python

def inject_pubkey(
    sb, pubkey
):

```

*Call self as a function.*

``` python
inject_pubkey(sb, get_pubkey())
```

------------------------------------------------------------------------

### start_ssh

``` python

def start_ssh(
    sb
):

```

*Call self as a function.*

``` python
start_ssh(sb)
```

    ✔ started ssh service

``` python
ssh = _ssh(host,port); ssh
```

    <function __main__._ssh.<locals>.<lambda>(*cmd)>

------------------------------------------------------------------------

### verify_connection

``` python

def verify_connection(
    ssh
):

```

*Verify SSH connection to Sandbox and print system info.*

``` python
verify_connection(ssh)
```

    系统：  Linux
    主机名：modal
    用户：  root
    内核：  4.4.0
    架构：  x86_64
    系统类型：GNU/Linux
