> ## Documentation Index
> Fetch the complete documentation index at: https://runcrate.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SkyPilot

> Run SkyPilot tasks, jobs and services on Runcrate GPUs today, as a SkyPilot SSH Node Pool.

[SkyPilot](https://docs.skypilot.co) runs AI workloads on any infrastructure from one task YAML. Native support for Runcrate (`sky launch --infra runcrate`) is in review with the SkyPilot project. Until it ships, you can run SkyPilot on Runcrate machines as an **SSH Node Pool**: you launch the machines, SkyPilot installs its runtime on them, and every `sky launch`, `sky exec` and `sky jobs launch` runs there.

## What you need

* SkyPilot installed on your computer (`pip install "skypilot[kubernetes]"`), plus `kubectl`, `socat` and GNU `netcat` (on macOS: `brew install kubectl socat netcat`).
* An SSH key pair. Add the public key on the [SSH keys](https://runcrate.ai/dashboard/ssh-keys) page or with the API.
* Credit in your workspace. The machine bills by the hour until you terminate it.

## Set it up

**1. Launch an instance with your SSH key**

In the dashboard, launch an instance and pick your SSH key. Or with the API (`ssh_key_id` comes from `GET /api/v1/ssh-keys`, `instance_type_id` from `GET /api/v1/instances/types`):

```bash theme={"theme":{"light":"github-light","dark":"catppuccin-mocha"}}
curl -X POST https://www.runcrate.ai/api/v1/instances \
  -H "Authorization: Bearer $RUNCRATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "sky-pool-1", "instance_type_id": "<offer id>", "ssh_key_id": "<key id>"}'
```

Wait until its status is `running` and note its IP. Pick an offer with `port_mapped: false`: SkyPilot needs SSH on port 22.

**2. Describe the pool**

Add the machine to `~/.sky/ssh_node_pools.yaml`:

```yaml theme={"theme":{"light":"github-light","dark":"catppuccin-mocha"}}
runcrate:
  user: root
  identity_file: ~/.ssh/id_ed25519
  hosts:
    - 203.0.113.42
```

**3. Install SkyPilot on it**

```bash theme={"theme":{"light":"github-light","dark":"catppuccin-mocha"}}
sky ssh up
sky check ssh
```

`sky check ssh` lists `runcrate` under SSH Node Pools.

**4. Run your work**

```bash theme={"theme":{"light":"github-light","dark":"catppuccin-mocha"}}
sky launch --infra ssh/runcrate --gpus V100:1 --cpus 2 --memory 8 -- nvidia-smi
```

SkyPilot asks for at least 4 vCPUs by default and k3s keeps about one, so pass `--cpus` and `--memory` on machines with 8 vCPUs or fewer.

Or set `resources.infra: ssh/runcrate` in a task YAML.

## When you are done

Remove the SkyPilot runtime, then terminate the instance. SkyPilot does not stop Runcrate billing: only terminating the instance does.

```bash theme={"theme":{"light":"github-light","dark":"catppuccin-mocha"}}
sky ssh down
runcrate instances delete sky-pool-1
```

## Good to know

* A pool of several machines needs port 6443 open between them. Add a firewall rule for it in the environment ([Settings > Environments](https://runcrate.ai/dashboard/settings/environments)), limited to the machines' addresses.
* With native support, SkyPilot will launch and terminate Runcrate machines itself, pick the region and GPU from Runcrate's live prices, and tear clusters down with `sky down`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.