[Build] Add srt_empty extra group for device-agnostic install (#31300)

Co-authored-by: yixiaodapeng <yixiaodapeng@example.com>
Co-authored-by: Alex Nails <alex.nails@radixark.ai>
This commit is contained in:
John
2026-08-05 13:17:46 -07:00
committed by GitHub
co-authored by yixiaodapeng Alex Nails
parent de34dd11e9
commit 5c4f72f92a
4 changed files with 130 additions and 12 deletions
+19 -5
View File
@@ -17,14 +17,16 @@ classifiers = [
dependencies = ["aiohttp", "IPython", "numpy", "requests", "setproctitle", "tqdm"]
[project.optional-dependencies]
runtime_common = [
# runtime_base: torch-free subset of runtime_common.
# Used by srt_empty for device-agnostic install on non-NVIDIA platforms.
# NOTE: Do NOT add packages that depend on torch/triton here — they belong in runtime_common.
runtime_base = [
"aiohttp",
"anthropic>=0.20.0",
"apache-tvm-ffi",
"av",
"blobfile==3.0.0",
"build",
"compressed-tensors",
"datasets",
"easydict",
"einops",
@@ -42,7 +44,6 @@ runtime_common = [
"openai==2.6.1",
"openai-harmony==0.0.4",
"orjson",
"outlines==0.1.11",
"packaging",
"partial_json_parser",
"pillow",
@@ -60,16 +61,29 @@ runtime_common = [
"smg-grpc-servicer>=0.5.0",
"soundfile==0.13.1",
"tiktoken",
"timm==1.0.16",
"torchao==0.9.0",
"tqdm",
"transformers==5.12.1",
"uvicorn",
"uvloop",
"xxhash",
]
# runtime_common: backward-compatible — same install result as before the split.
runtime_common = [
"sglang[runtime_base]",
"compressed-tensors",
"outlines==0.1.11",
"timm==1.0.16",
"torchao==0.9.0",
"xgrammar==0.2.1",
]
# srt_empty: device-agnostic install — pure Python packages only, no torch dependency chain.
# Enables OOT plugins (e.g. sglang-plugin-FL) to install sglang without conflicting with
# vendor-specific PyTorch builds (torch_npu, torch_musa, etc.).
# Usage: cp pyproject_other.toml pyproject.toml && pip install -e ".[srt_empty]"
srt_empty = ["sglang[runtime_base]"]
diffusion_common = [
"addict",
"cloudpickle",