FreeToken brings datacenter-scale model serving to your desktop. Run massive models locally, fast and efficiently.
fix(install): resolve sglang-kernel from PyPI, not the sglang index (#524)
Xiaoze Fana8eb986758a2
diff --git a/install.sh b/install.shindex a7df8327..60b4439c 100755--- a/install.sh+++ b/install.sh@@ -4,8 +4,8 @@## Installs the `freetoken` runtime (the `ft` CLI) and its prebuilt kernel-cache# wheel into a managed venv, then wires it up so FreeToken Desktop can find it.-# Dependencies come from PyPI via uv, except torch and sglang-kernel whose cu130-# wheels live on dedicated indexes (see CU_INDEX_ARGS below).+# Dependencies come from PyPI via uv, except torch whose cu130+# wheels live on a dedicated index (see CU_INDEX_ARGS below).## Typical use (once a release exists):# curl -fsSL https://<host>/install.sh | bash@@ -201,12 +201,12 @@ mkdir -p "$FT_HOME"# re-install can't inherit a stale/mismatched torch (e.g. an old cu128 venv after a cu130 bump)."$UV" venv "$VENV" --python "$PY_VERSION" --clear-# PyPI's torch 2.11.0 and sglang-kernel 0.4.5 are the same cu130 builds these indexes-# serve; the explicit indexes pin provenance to the cu130 channels. `unsafe-best-match`+# PyPI's torch 2.11.0 is the same cu130 build the pytorch index+# serves; the explicit index pins provenance to the cu130 channel. `unsafe-best-match`# is needed because the pytorch index also mirrors stale copies of common deps (e.g.# packaging<=24.1) that would shadow PyPI under uv's first-index strategy; all indexes# here are trusted. [tool.uv.sources] does not survive into a built wheel, so the-# indexes it names must be repeated below.+# index it names must be repeated below.# flashinfer JIT-compiles its kernels on first use (e.g. sampling softmax), which needs nvcc --# breaking driver-only on a box with no CUDA toolkit. flashinfer-cubin + flashinfer-jit-cache ship# those kernels PREBUILT (multi-arch), so nothing compiles at runtime. They live on flashinfer's@@ -220,7 +220,6 @@ INSTALL_WHEELS=(CU_INDEX_ARGS=(--index-strategy unsafe-best-match--extra-index-url https://download.pytorch.org/whl/cu130- --extra-index-url https://docs.sglang.io/whl/cu130--extra-index-url https://flashinfer.ai/whl--extra-index-url https://flashinfer.ai/whl/cu130)diff --git a/pyproject.toml b/pyproject.tomlindex 5511c1f2..6b247a2c 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -87,24 +87,18 @@ accel = ["freetoken[fi,sgl]"]# in a dedicated environment when you specifically need the Marlin path.# uv-only provenance pins — pip ignores this section and resolves from PyPI, which-# works: PyPI's torch 2.11.0 and sglang-kernel 0.4.5 are the same cu130 builds these-# indexes serve. `explicit = true` scopes each index to the one package that needs it+# works: PyPI's torch 2.11.0 is the same cu130 build this index serves.+# `explicit = true` scopes the index to the one package that needs it# (the torch index also mirrors stale copies of common deps, e.g. packaging<=24.1,# which would otherwise shadow PyPI under uv's first-index strategy).[tool.uv.sources]torch = { index = "pytorch-cu130" }-sglang-kernel = { index = "sglang-cu130" }[[tool.uv.index]]name = "pytorch-cu130"url = "https://download.pytorch.org/whl/cu130"explicit = true-[[tool.uv.index]]-name = "sglang-cu130"-url = "https://docs.sglang.io/whl/cu130"-explicit = true-[tool.setuptools]include-package-data = truepackage-dir = {"" = "python"}