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

# Launch jobs with SkyPilot

> Install SkyPilot and launch AI workloads on a Together Kubernetes cluster.

[SkyPilot](https://docs.skypilot.ai/) is an orchestration framework that launches AI workloads on Kubernetes clusters and across clouds from a single task file, so you don't write pod specs or manage scheduling details yourself. SkyPilot also monitors your jobs and lets you cancel them. This guide connects SkyPilot to a Together GPU cluster and launches a training task on its GPUs.

## Requirements

* A Together [Kubernetes GPU cluster](https://docs.together.ai/docs/gpu-clusters-quickstart.md) in the **Ready** state.
* The [Together CLI](https://docs.together.ai/reference/cli/getting-started.md), to download the cluster credentials.

Install SkyPilot with the Kubernetes extra:

```bash theme={null}
uv tool install --with pip "skypilot[kubernetes]"
```

## Connect SkyPilot to the cluster

To give SkyPilot access to the cluster, download the cluster's credentials with the Together CLI. The command merges them into your local `~/.kube/config` and makes the cluster's context current:

```bash theme={null}
tg clusters get-credentials <CLUSTER_ID> --set-default-context --no-json
```

Verify that SkyPilot can reach the cluster:

```bash theme={null}
sky check k8s
```

You should see Kubernetes enabled, with your cluster's context under `Allowed contexts`:

```text theme={null}
Checking credentials to enable infra for SkyPilot.
  Kubernetes: enabled [compute]
    Allowed contexts:
    └── <CLUSTER_NAME>: enabled.

🎉 Enabled infra 🎉
  Kubernetes [compute]
```

List the GPUs SkyPilot can schedule on the cluster:

```bash theme={null}
sky gpus list --infra k8s
```

## Launch a training task

Create a SkyPilot task file that runs your training script, `train.py`. Set `accelerators` to a GPU type and count from the `sky gpus list` output:

```yaml task.yaml theme={null}
workdir: .  # Syncs the current directory, including train.py

resources:
  accelerators: H100:8
  infra: k8s

setup: |
  pip install torch transformers

run: |
  python train.py
```

Launch the task from the directory that contains `train.py`:

```bash theme={null}
sky launch -c my-job task.yaml
```

SkyPilot provisions the pods, runs the `setup` commands, and streams the `run` output to your terminal.

When the task finishes, take down its pods to free their GPUs:

```bash theme={null}
sky down my-job
```

## Fine-tune GPT-OSS

For a complete fine-tuning example, run SkyPilot's [GPT-OSS recipe](https://github.com/skypilot-org/skypilot/tree/master/llm/gpt-oss-finetuning#lora-finetuning), which fine-tunes GPT-OSS 20B with a low-rank adapter (LoRA). Clone the SkyPilot repository and launch the recipe from its directory. The task mounts the recipe's local `sft/` folder, so downloading the YAML file alone isn't enough:

```bash theme={null}
git clone --depth 1 https://github.com/skypilot-org/skypilot.git
cd skypilot/llm/gpt-oss-finetuning
sky launch -c gpt-together gpt-oss-20b-lora.yaml --infra k8s
```

## Next steps

> **[Run workloads on Kubernetes](https://docs.together.ai/docs/kubernetes-workloads.md)**
>
> Deploy pods with persistent storage and run GPU workloads directly.

> **[Gang-schedule GPU jobs with Volcano](https://docs.together.ai/docs/volcano-on-gpu-clusters.md)**
>
> Schedule all of a distributed job's pods together, or none of them.


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