[Docs] Add --prerelease=allow to cookbook uv install commands (#35920)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
zijiexia
2026-08-21 15:51:48 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent 2440820528
commit fe8f9d7457
28 changed files with 36 additions and 32 deletions
@@ -27,7 +27,7 @@ For all methods and hardware platforms, see the [official SGLang installation gu
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install sglang uv pip install --prerelease=allow sglang
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -19,7 +19,7 @@ For all methods and hardware platforms, see the [official SGLang installation gu
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install sglang uv pip install --prerelease=allow sglang
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -22,7 +22,7 @@ uv venv --python 3.12 && source .venv/bin/activate
git clone https://github.com/sgl-project/sglang.git git clone https://github.com/sgl-project/sglang.git
cd sglang cd sglang
git fetch origin pull/29186/head && git checkout FETCH_HEAD git fetch origin pull/29186/head && git checkout FETCH_HEAD
uv pip install -e python uv pip install --prerelease=allow -e python
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -19,7 +19,7 @@ Ornith-1.0 model cards recommend SGLang `>=0.5.9`. The Deploy panel below emits
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install "sglang>=0.5.9" uv pip install --prerelease=allow "sglang>=0.5.9"
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -19,7 +19,7 @@ For all methods and hardware platforms, see the [official SGLang installation gu
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install sglang uv pip install --prerelease=allow sglang
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -41,7 +41,7 @@ git clone https://github.com/sgl-project/sglang.git
cd sglang cd sglang
uv venv uv venv
source .venv/bin/activate source .venv/bin/activate
uv pip install -e "python[all]" --index-url=https://pypi.org/simple uv pip install --prerelease=allow -e "python[all]" --index-url=https://pypi.org/simple
pip install nvidia-cudnn-cu12==9.16.0.29 pip install nvidia-cudnn-cu12==9.16.0.29
# Install ffmpeg to support video input # Install ffmpeg to support video input
sudo apt update sudo apt update
+1 -1
View File
@@ -19,7 +19,7 @@ For all methods and hardware platforms, see the [official SGLang installation gu
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install sglang uv pip install --prerelease=allow sglang
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -15,7 +15,7 @@ Intern-S1 includes the large **Intern-S1** MoE model and the smaller **Intern-S1
Refer to the [official SGLang installation guide](../../../docs/get-started/install), or install from source: Refer to the [official SGLang installation guide](../../../docs/get-started/install), or install from source:
```bash Command ```bash Command
uv pip install 'git+https://github.com/sgl-project/sglang.git#subdirectory=python' uv pip install --prerelease=allow 'git+https://github.com/sgl-project/sglang.git#subdirectory=python'
``` ```
## 3. Model Deployment ## 3. Model Deployment
@@ -19,7 +19,7 @@ For all methods and hardware platforms, see the [official SGLang installation gu
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install sglang uv pip install --prerelease=allow sglang
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -20,7 +20,7 @@ Install SGLang from source or use an NVIDIA Docker image:
```bash Command ```bash Command
# Install from source # Install from source
uv pip install 'git+https://github.com/sgl-project/sglang.git#subdirectory=python' uv pip install --prerelease=allow 'git+https://github.com/sgl-project/sglang.git#subdirectory=python'
# Or use Docker for NVIDIA GPUs # Or use Docker for NVIDIA GPUs
docker pull lmsysorg/sglang:latest docker pull lmsysorg/sglang:latest
@@ -19,7 +19,7 @@ For all methods and hardware platforms, see the [official SGLang installation gu
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install sglang uv pip install --prerelease=allow sglang
``` ```
<Note> <Note>
@@ -23,7 +23,7 @@ pip install uv
# https://github.com/sgl-project/sglang/pull/34262 # https://github.com/sgl-project/sglang/pull/34262
git clone -b muse-glimmer https://github.com/sgl-project/sglang.git git clone -b muse-glimmer https://github.com/sgl-project/sglang.git
cd sglang cd sglang
uv pip install -e "python[all]" uv pip install --prerelease=allow -e "python[all]"
``` ```
Run the **Python** output of the command panel below in that environment. Run the **Python** output of the command panel below in that environment.
@@ -25,10 +25,10 @@ uv venv --python 3.12 && source .venv/bin/activate
git clone https://github.com/sgl-project/sglang.git git clone https://github.com/sgl-project/sglang.git
cd sglang cd sglang
git fetch origin pull/27944/head && git checkout FETCH_HEAD git fetch origin pull/27944/head && git checkout FETCH_HEAD
uv pip install -e python uv pip install --prerelease=allow -e python
``` ```
Then run the **Python** output of the command panel below in that environment. The **Docker** tab is simpler — its image bundles the CUDA-13 runtime and the #27944 code. Once [PR #27944](https://github.com/sgl-project/sglang/pull/27944) is merged and released, `uv pip install sglang` will pull M3 support directly. Then run the **Python** output of the command panel below in that environment. The **Docker** tab is simpler — its image bundles the CUDA-13 runtime and the #27944 code. Once [PR #27944](https://github.com/sgl-project/sglang/pull/27944) is merged and released, `uv pip install --prerelease=allow sglang` will pull M3 support directly.
</Tab> </Tab>
@@ -19,7 +19,7 @@ For all methods and hardware platforms, see the [official SGLang installation gu
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install sglang uv pip install --prerelease=allow sglang
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -46,7 +46,7 @@ Install SGLang via pip or from source:
pip install sglang pip install sglang
# Or install from source # Or install from source
uv pip install 'git+https://github.com/sgl-project/sglang.git#subdirectory=python' uv pip install --prerelease=allow 'git+https://github.com/sgl-project/sglang.git#subdirectory=python'
# Or use Docker # Or use Docker
docker pull lmsysorg/sglang:latest docker pull lmsysorg/sglang:latest
@@ -22,7 +22,7 @@ At a high level:
Refer to the [official SGLang installation guide](../../../docs/get-started/install), or install nightly wheel through: Refer to the [official SGLang installation guide](../../../docs/get-started/install), or install nightly wheel through:
```bash Command ```bash Command
uv pip install sglang==0.5.6.post3.dev1278+gad1b4e472 --extra-index-url https://sgl-project.github.io/whl/nightly/ uv pip install --prerelease=allow sglang==0.5.6.post3.dev1278+gad1b4e472 --extra-index-url https://sgl-project.github.io/whl/nightly/
``` ```
## 3. Model Deployment ## 3. Model Deployment
@@ -25,7 +25,7 @@ SGLang from the main branch is required for Nemotron3-Super. You can install fro
```bash Command ```bash Command
# Install from source # Install from source
uv pip install 'git+https://github.com/sgl-project/sglang.git#subdirectory=python' uv pip install --prerelease=allow 'git+https://github.com/sgl-project/sglang.git#subdirectory=python'
# Or use Docker # Or use Docker
docker pull lmsysorg/sglang:latest docker pull lmsysorg/sglang:latest
@@ -19,7 +19,7 @@ For all methods and hardware platforms, see the [official SGLang installation gu
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
SGLANG_BUILD_RUST_EXTS=none uv pip install 'git+https://github.com/sgl-project/sglang.git@refs/pull/33554/head#subdirectory=python' SGLANG_BUILD_RUST_EXTS=none uv pip install --prerelease=allow 'git+https://github.com/sgl-project/sglang.git@refs/pull/33554/head#subdirectory=python'
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -23,7 +23,7 @@ uv venv --python 3.12 && source .venv/bin/activate
# tagged release — install from main. The serving runtime is in the base dependencies, no extra needed: # tagged release — install from main. The serving runtime is in the base dependencies, no extra needed:
git clone https://github.com/sgl-project/sglang.git git clone https://github.com/sgl-project/sglang.git
cd sglang cd sglang
uv pip install -e python uv pip install --prerelease=allow -e python
``` ```
Then run the **Python** output of the command panel below in that environment. The **Docker** tab is simpler — `lmsysorg/sglang:latest` bundles the CUDA-13 runtime and the M.1 code. Then run the **Python** output of the command panel below in that environment. The **Docker** tab is simpler — `lmsysorg/sglang:latest` bundles the CUDA-13 runtime and the M.1 code.
@@ -22,7 +22,7 @@ uv venv --python 3.12 && source .venv/bin/activate
git clone https://github.com/sgl-project/sglang.git git clone https://github.com/sgl-project/sglang.git
cd sglang cd sglang
uv pip install -e python uv pip install --prerelease=allow -e python
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -23,7 +23,7 @@ uv venv --python 3.12 && source .venv/bin/activate
git clone https://github.com/sgl-project/sglang.git git clone https://github.com/sgl-project/sglang.git
cd sglang cd sglang
uv pip install -e python uv pip install --prerelease=allow -e python
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -97,7 +97,7 @@ SGLang from the main branch is required for Qwen3.5. You can install from source
```bash Command ```bash Command
# Install from source # Install from source
uv pip install 'git+https://github.com/sgl-project/sglang.git#subdirectory=python' uv pip install --prerelease=allow 'git+https://github.com/sgl-project/sglang.git#subdirectory=python'
# Or use Docker (NVIDIA GPUs) # Or use Docker (NVIDIA GPUs)
docker pull lmsysorg/sglang:latest docker pull lmsysorg/sglang:latest
@@ -77,10 +77,10 @@ SGLang `>=0.5.10` is required for Qwen3.6. You can install from PyPI, from sourc
```bash Command ```bash Command
# Install from PyPI # Install from PyPI
uv pip install sglang uv pip install --prerelease=allow sglang
# Or install from source # Or install from source
uv pip install 'git+https://github.com/sgl-project/sglang.git#subdirectory=python' uv pip install --prerelease=allow 'git+https://github.com/sgl-project/sglang.git#subdirectory=python'
# Or use Docker (NVIDIA GPUs; also serves the NVFP4 variants) # Or use Docker (NVIDIA GPUs; also serves the NVFP4 variants)
docker pull lmsysorg/sglang:latest docker pull lmsysorg/sglang:latest
@@ -19,14 +19,14 @@ For all methods and hardware platforms, see the [official SGLang installation gu
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install sglang uv pip install --prerelease=allow sglang
# For the DFLASH2 cells only — DFlash2 selector support is newer than the # For the DFLASH2 cells only — DFlash2 selector support is newer than the
# latest release, so build from the commit those cells were validated on # latest release, so build from the commit those cells were validated on
# instead of the line above: # instead of the line above:
# git clone https://github.com/sgl-project/sglang.git && cd sglang # git clone https://github.com/sgl-project/sglang.git && cd sglang
# git checkout 1cf2b8c54d81802abc15dcf23a29b9cc687bc01e # PR #35496 # git checkout 1cf2b8c54d81802abc15dcf23a29b9cc687bc01e # PR #35496
# uv pip install -e "python[all]" # uv pip install --prerelease=allow -e "python[all]"
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -18,7 +18,7 @@ For all methods and hardware platforms, see the [official SGLang installation gu
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install sglang uv pip install --prerelease=allow sglang
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
@@ -23,7 +23,7 @@ uv venv --python 3.12 && source .venv/bin/activate
git clone https://github.com/sgl-project/sglang.git git clone https://github.com/sgl-project/sglang.git
cd sglang cd sglang
git fetch origin pull/33829/head && git checkout FETCH_HEAD git fetch origin pull/33829/head && git checkout FETCH_HEAD
uv pip install -e python uv pip install --prerelease=allow -e python
``` ```
Then run the **Python** output of the command panel below in that environment. Then run the **Python** output of the command panel below in that environment.
+3 -3
View File
@@ -21,11 +21,11 @@ pip install -U uv
uv venv --python 3.12 && source .venv/bin/activate uv venv --python 3.12 && source .venv/bin/activate
# Install from source (main carries the suffix-aware `hunyuan` parser + the # Install from source (main carries the suffix-aware `hunyuan` parser + the
# HYV3 model code). Once a tagged release picks it up, `uv pip install sglang` # HYV3 model code). Once a tagged release picks it up,
# is enough. # `uv pip install --prerelease=allow sglang` is enough.
git clone https://github.com/sgl-project/sglang.git git clone https://github.com/sgl-project/sglang.git
cd sglang cd sglang
uv pip install -e python uv pip install --prerelease=allow -e python
``` ```
Run the **Python** output of the command panel below in that environment. Run the **Python** output of the command panel below in that environment.
+4
View File
@@ -25,6 +25,10 @@ pip install uv
uv pip install --prerelease=allow sglang uv pip install --prerelease=allow sglang
``` ```
<Note>
Some of SGLang's dependencies only publish pre-releases on PyPI, so without `--prerelease=allow` uv older than 0.12.0 silently installs SGLang 0.5.9. On [uv 0.12.0](https://github.com/astral-sh/uv/releases/tag/0.12.0) and newer the flag is a harmless no-op.
</Note>
The major version of Cuda is 13 by default. To install sglang under Cuda 12 with pip or uv, please try the following commands: The major version of Cuda is 13 by default. To install sglang under Cuda 12 with pip or uv, please try the following commands:
```bash Command ```bash Command
pip install --upgrade pip pip install --upgrade pip