SkyPilot Documentation

repository·master·Indexed 27 days ago

https://github.com/skypilot-org/skypilot

A system to run, manage, and scale AI workloads across Kubernetes, Slurm, and over 20 cloud providers. It provides a unified interface for deploying jobs as code and managing compute resources. Features include SkyServe for scaling model replicas, fuse-proxy for non-privileged FUSE in Kubernetes, and support for deploying LLMs like Code Llama and DBRX.

Tokens
221.8K
Snippets
707
Records
1.2K
Agent score
94%

What's inside SkyPilot

  1. Overview of Cloud Utilities in SkyPilot

    master
    The sky/clouds/utils directory contains shared utility functions required by sky.skylet.providers and other SkyPilot modules. These utilities are decoupled from specific cloud provider implementations to prevent unnecessary dependency imports (such as ray) when modules are loaded. This architecture ensures that clouds using newer provisioners—which have removed the ray dependency—can still be imported without failure.
  2. Overview of the Service Catalog module

    master
    The Service Catalog module provides comprehensive information about clouds supported by SkyPilot. It includes details on instance type offerings, pricing, and data transfer costs. The module is designed to allow querying of this information and selecting the most suitable instance types based on specific resource requirements. It is primarily utilized by the Clouds module.
  3. Overview of SkyPilot YAML specification

    master

    SkyPilot uses a YAML interface to specify clusters, jobs, or services. You can define resource requirements, setup commands, run commands, file mounts, and storage mounts.

    Key characteristics:

    • All fields are optional: You only need to specify the fields relevant to your task; otherwise, defaults are used.
    • Usage: YAML files can be used via the SkyPilot CLI or the programmatic API (e.g., using sky.Task.from_yaml()).
  4. Overview of SkyPilot

    master

    SkyPilot is a system designed to run, manage, and scale AI workloads across any AI infrastructure. It provides a unified interface for AI teams to run jobs on various clouds and for infrastructure teams to manage compute with advanced scheduling, scaling, and orchestration.

    Key Capabilities:

    • Unified Interface: Use one interface for reserved GPUs, Kubernetes clusters, Slurm clusters, or over 20+ cloud providers.
    • Flexible Provisioning: Automated provisioning of GPUs, TPUs, and CPUs with smart failover capabilities.
    • Resource Optimization: Features include Autostop (automatic cleanup of idle resources), Binpacking (workload binpacking on shared clusters), and an Intelligent scheduler to maximize GPU fleet utilization.
    • Kubernetes Optimization: Makes Kubernetes AI-native by providing gang scheduling, multi-node jobs, and simplified interactive development (SSH into pods, code syncing, and IDE connectivity).
  5. Overview of SkyServe

    master

    SkyServe is SkyPilot's model serving library (currently in beta). It allows you to deploy existing serving frameworks (such as vLLM, TGI, or FastAPI) across multiple regions or clouds.

    Key features include:

    • Multi-cloud/Multi-region deployment: Scale replicas across different locations to reduce costs and increase availability.
    • Automatic Load Balancing: A centralized controller distributes traffic to replicas using a least-load algorithm.
    • Autoscaling and Recovery: Handles replica scaling and automatically re-launches failed replicas.
    • Privacy: Everything runs inside your own cloud accounts and VPCs.

    Note: For production-ready requirements (high performance, multi-cluster design, built-in observability, and advanced security), consider SkyPilot Endpoints.

  6. Overview of Sky Serve

    master

    Sky Serve is a serving library for SkyPilot designed to expose a single endpoint that distributes incoming traffic across multiple serving endpoints. These endpoints can reside on different resources, regions, and clouds. Sky Serve provides transparent handling for:

    • Load balancing: Distributing traffic across healthy endpoints.
    • Failover: Managing requests when endpoints become unhealthy.
    • Autoscaling: Adjusting the number of serving endpoints based on demand.
  7. Choose the right SkyPilot abstraction for your workload

    master

    SkyPilot provides three core abstractions depending on your workflow stage:

    1. SkyPilot Clusters (sky launch / sky exec): Best for interactive development and debugging. Use these to launch a cluster, SSH into it, or connect VSCode/Cursor to iterate quickly. The cluster stays up until manually stopped or autostop triggers.
    2. Managed Jobs (sky jobs launch): Best for long-running training and batch jobs. These run unattended and manage the full lifecycle, including automatic recovery from spot preemptions, quota limits, and transient failures.
    3. SkyServe (sky serve up): Best for production model serving. Provides autoscaling, load balancing, and multi-cloud replicas for model serving endpoints and API services.
  8. Understand SkyServe Architecture

    master

    SkyServe uses a centralized controller VM to manage deployments. The architecture consists of:

    1. Controller: Monitors replica status, re-launches failed replicas, and handles autoscaling. It is launched in the cloud with the best price/performance ratio.
    2. Load Balancer: A lightweight HTTP server that listens on the service endpoint and distributes incoming traffic to ready replicas.

    All process groups share a single controller VM, which can be customized for specific resource requirements.

  9. Understand SkyPilot RBAC roles

    master

    SkyPilot provides basic Role-Based Access Control (RBAC) with two supported roles:

    • User: Can launch and manage resources such as clusters and jobs.
    • Admin: Can manage SkyPilot API server settings, users, and workspaces.

    Note: RBAC support is only available when using SSO authentication. It is not supported when using basic authentication.

  10. Understand the SkyPilot Client-Server Architecture

    master
    SkyPilot operates using a client-server architecture. When executing commands or making API calls, the SkyPilot client issues asynchronous requests to a SkyPilot API server. The API server is responsible for handling all incoming requests and managing the underlying orchestration tasks.
  11. Understand SkyPilot cluster name mapping

    master

    SkyPilot distinguishes between two types of cluster names to ensure compatibility with cloud provider constraints and to prevent naming collisions between users in the same organization:

    1. SkyPilot cluster name (cluster_name): The original "display" name you choose or that the system generates. This is the name you use in CLI commands and APIs (e.g., sky launch -c <cluster_name>).
    2. Cluster name on cloud (cluster_name_on_cloud): An auto-generated name used when communicating with cloud providers (e.g., by ray up or node_provider). This name is automatically truncated to meet cloud length limits and appended with a user hash to ensure uniqueness across different users.

    Note that the cloud name is also recorded in the VM tag ray-cluster-name.