Task YAML
Complete reference for SkyPilot-compatible Task YAML.
Last updated
resources:
accelerators: B200:8
run: python train.pyProvision cluster
→ Sync workdir
→ Run setup (once)
→ Execute run commandsresources:
infra: mithril
accelerators: B200:8run: python train.pyrun: |
cd /app
python train.py --epochs 100
python eval.pysetup: |
pip install -r requirements.txt
apt-get update && apt-get install -y vimworkdir: .file_mounts:
/data: s3://my-bucket/data
/models: gs://my-bucket/modelsvolumes:
/data: my-volume-nameenvs:
WANDB_API_KEY: xxx
BATCH_SIZE: 32
DEBUG: "true"num_nodes: 2config:
mithril:
limit_price: 8.0 # max $/hour/instance you'll payname: llm-training
resources:
infra: mithril
accelerators: B200:8
config:
mithril:
limit_price: 32.0
num_nodes: 4
workdir: .
file_mounts:
/data: s3://my-bucket/training-data
volumes:
/checkpoints: my-checkpoints-volume
envs:
WANDB_PROJECT: my-project
WANDB_API_KEY: ${WANDB_API_KEY}
setup: |
pip install -r requirements.txt
wandb login
run: |
torchrun \
--nproc_per_node=8 \
--nnodes=$SKYPILOT_NUM_NODES \
train.py \
--data /data \
--output /checkpoints