Using SGLang on CKS is easiest with SkyPilot, which provides a simple way to launch and manage distributed applications on Kubernetes clusters. This guide shows you how to set up SGLang with SkyPilot on CKS by covering the following:Documentation Index
Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
Use this file to discover all available pages before exploring further.
- Installing and running SkyPilot
- Running SGLang
Prerequisites
Before completing the steps in this guide, be sure your development environment meets the following requirements:-
You have your
kubeconfigfile properly set and can interact with clusters and Pods usingkubectl. -
A environment variable set to
HF_TOKENwith your Hugging Face token. For more information, see the Hugging Face instructions at User access tokens. -
Authentication to use the
meta-llama/Llama-3.1-8B-Instructmodel. For more information, go to meta-llama/Llama-3.1-8B-Instruct and request access. Note that approval for restricted models can take a few hours or longer. -
The
socatandnetcatnetworking utilities.
Options for installing SkyPilot
You can install SkyPilot using Anaconda or uv. The following instructions cover both techniques.Install SkyPilot with Anaconda
Python development environment with Anaconda installed. Run the following commands to install SkyPilot with Anaconda:- CKS requires SkyPilot version 0.10.1 or later.
- SkyPilot requires Python 3.7 to 3.13.
Install SkyPilot with uv
To install SkyPilot with uv, you might need to download and install uv first. Follow the instruction on uv GitHub repository. After installing uv, run the following commands:Run SkyPilot
Run the following command to enable SkyPilot:Run a nccl test on Nodes with InfiniBand enabled
If you have Nodes with InfiniBand enabled, you can run a nccl test by completing the following steps:
-
Copy the following file and name it
nccl-network-tier.yaml. Replaceacceleratorswith your Node type (which corresponds to thegpu.nvidia.com/classproperty): -
Run the following command:
Run SGLang
To run SGLang on CKS, you can use the following example script. Note that you need to complete the steps for installing and running SkyPilot as described above. To run SGLang, complete the following steps:-
Copy the following YAML file and name it
sglang.yaml. Be sure to replace theacceleratorsfield with your GPU type: -
Run the following command: