diff --git a/docs/get_started/install.md b/docs/get_started/install.md index 59aff71b3..259e4b646 100644 --- a/docs/get_started/install.md +++ b/docs/get_started/install.md @@ -15,11 +15,11 @@ uv pip install "sglang" ``` **Quick fixes to common problems** -- In some cases (e.g., GB200), the above command might install a wrong torch version (e.g., the CPU version) due to dependency resolution. To fix this, you can first run the above command and then force-reinstall the correct [PyTorch](https://pytorch.org/get-started/locally/) with the following: - ``` - uv pip install "torch==2.9.1" "torchvision" --extra-index-url https://download.pytorch.org/whl/cu129 --force-reinstall - ``` -- For CUDA 13, Docker is recommended (see the Method 3 note on B300/GB300/CUDA 13). If you do not have Docker access, installing the matching `sgl_kernel` wheel from [the sgl-project whl releases](https://github.com/sgl-project/whl/releases) after installing SGLang also works. Replace `X.Y.Z` with the `sgl_kernel` version required by your SGLang (you can find this by running `uv pip show sgl_kernel`). Examples: +- For CUDA 13, Docker is recommended (see Method 3 note on B300/GB300/CUDA 13). If you do not have Docker access, an extra index url needs to be provided when installing wheels: +``` +uv pip install "sglang" --extra-index-url https://download.pytorch.org/whl/cu130 +``` +- The `sgl_kernel` wheel for CUDA 13 can be downloaded from [the sgl-project whl releases](https://github.com/sgl-project/whl/blob/gh-pages/cu130/sgl-kernel/index.html). Replace `X.Y.Z` with the `sgl_kernel` version required by your SGLang install (you can find this by running `uv pip show sgl_kernel`). Examples: ```bash # x86_64 uv pip install "https://github.com/sgl-project/whl/releases/download/vX.Y.Z/sgl_kernel-X.Y.Z+cu130-cp310-abi3-manylinux2014_x86_64.whl" @@ -27,7 +27,7 @@ uv pip install "sglang" # aarch64 uv pip install "https://github.com/sgl-project/whl/releases/download/vX.Y.Z/sgl_kernel-X.Y.Z+cu130-cp310-abi3-manylinux2014_aarch64.whl" ``` -- If you encounter `OSError: CUDA_HOME environment variable is not set`, set it to your CUDA install root with either of the following solutions: +- If you encounter `OSError: CUDA_HOME environment variable is not set`. Please set it to your CUDA install root with either of the following solutions: 1. Use `export CUDA_HOME=/usr/local/cuda-` to set the `CUDA_HOME` environment variable. 2. Install FlashInfer first following [FlashInfer installation doc](https://docs.flashinfer.ai/installation.html), then install SGLang as described above. diff --git a/python/pyproject.toml b/python/pyproject.toml index ccfeccf2a..5ed29db44 100755 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -82,6 +82,22 @@ dependencies = [ "grpcio-health-checking==1.75.1", # required for Kubernetes gRPC health probes ] +[[tool.uv.index]] +name = "pypi" +url = "https://pypi.org/simple" +default = true + +[[tool.uv.index]] +name = "torch-cu129" +url = "https://download.pytorch.org/whl/cu129" +explicit = true + +[tool.uv.sources] +torch = [ + { index = "pypi", marker = "platform_machine == 'x86_64'"}, + { index = "torch-cu129", marker = "platform_machine == 'aarch64'"}, +] + [project.optional-dependencies] checkpoint-engine = ["checkpoint-engine==0.1.2"] diffusion = [