docs: add SkyPilot template and instructions for running embeddings/index build on cloud GPU

This commit is contained in:
Andy Lee
2025-08-13 14:01:32 -07:00
parent 46565b9249
commit a69464eb16
3 changed files with 64 additions and 0 deletions

28
sky/leann-build.yaml Normal file
View File

@@ -0,0 +1,28 @@
name: leann-build
resources:
# Choose a GPU for fast embeddings (examples: L4, A10G, A100). CPU also works but is slower.
accelerators: L4:1
# Optionally pin a cloud, otherwise SkyPilot will auto-select
# cloud: aws
disk_size: 100
# Sync local paths to the remote VM. Adjust as needed.
file_mounts:
# Example: mount your local data directory used for building
~/leann-data: ./data
setup: |
set -e
# Install uv (package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
# Install the LEANN CLI globally on the remote machine
uv tool install leann
# Optional: you can immediately kick off a build here, or use `sky exec` later.
# run: |
# export PATH="$HOME/.local/bin:$PATH"
# # Example build using the mounted data directory
# leann build my-index --docs ~/leann-data --backend hnsw --complexity 64 --graph-degree 32