Add UNSLOTH_UPDATE_DETAILS.json manifest system for Studio updates
Adds a centralized manifest file that controls Studio update behavior, allowing the team to temporarily switch update sources (PyPI vs git main), control llama.cpp source/version, and notify users of critical updates -- all without requiring a PyPI release. Changes: - New UNSLOTH_UPDATE_DETAILS.json manifest at repo root - setup.sh fetches manifest on startup, applies directives for unsloth source, llama.cpp repo/tag overrides, writes install timestamp - install_python_stack.py supports STUDIO_UNSLOTH_GIT_REF env var for installing unsloth from git instead of PyPI - New backend utils/update_check.py for manifest fetch and cache - New /api/update-check endpoint in main.py (unauthenticated) - Background thread checks manifest at startup, prints terminal banner - New use-update-check.ts React hook (module-level cache pattern) - navbar.tsx Update button shows dynamic badge and announcement - __root.tsx shows non-dismissable critical update banner
This commit is contained in:
parent
8981e6c804
commit
7eda1ba5a8
9 changed files with 391 additions and 18 deletions
|
|
@ -523,19 +523,38 @@ def install_python_stack() -> int:
|
|||
package_name,
|
||||
)
|
||||
else:
|
||||
# Update path: upgrade only unsloth + unsloth-zoo while preserving
|
||||
# existing torch/CUDA installations. Torch is pre-installed by
|
||||
# install.sh / setup.ps1; --upgrade-package targets only base pkgs.
|
||||
_progress("base packages")
|
||||
pip_install(
|
||||
"Updating base packages",
|
||||
"--no-cache-dir",
|
||||
"--upgrade-package",
|
||||
"unsloth",
|
||||
"--upgrade-package",
|
||||
"unsloth-zoo",
|
||||
req = REQ_ROOT / "base.txt",
|
||||
)
|
||||
# Manifest override: install from git main instead of PyPI
|
||||
_git_ref = os.environ.get("STUDIO_UNSLOTH_GIT_REF", "")
|
||||
if _git_ref:
|
||||
_progress("base packages (git)")
|
||||
pip_install(
|
||||
f"Installing unsloth from git@{_git_ref}",
|
||||
"--no-cache-dir",
|
||||
"--no-deps",
|
||||
f"git+https://github.com/unslothai/unsloth.git@{_git_ref}",
|
||||
constrain = False,
|
||||
)
|
||||
pip_install(
|
||||
"Updating remaining base packages",
|
||||
"--no-cache-dir",
|
||||
"--upgrade-package",
|
||||
"unsloth-zoo",
|
||||
req = REQ_ROOT / "base.txt",
|
||||
)
|
||||
else:
|
||||
# Update path: upgrade only unsloth + unsloth-zoo while preserving
|
||||
# existing torch/CUDA installations. Torch is pre-installed by
|
||||
# install.sh / setup.ps1; --upgrade-package targets only base pkgs.
|
||||
_progress("base packages")
|
||||
pip_install(
|
||||
"Updating base packages",
|
||||
"--no-cache-dir",
|
||||
"--upgrade-package",
|
||||
"unsloth",
|
||||
"--upgrade-package",
|
||||
"unsloth-zoo",
|
||||
req = REQ_ROOT / "base.txt",
|
||||
)
|
||||
|
||||
# 3. Extra dependencies
|
||||
_progress("unsloth extras")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue