studio: add --local to setup.sh + overlay unsloth-zoo from git main (#5252)
* studio: add --local to setup.sh + overlay unsloth-zoo from git main setup.sh now accepts --local, which exports STUDIO_LOCAL_INSTALL=1 and STUDIO_LOCAL_REPO=$REPO_ROOT. install_python_stack.py overlays unsloth-zoo from git main on top of the editable unsloth checkout in both local_repo branches (no-torch and with-torch). The Colab notebook now invokes ./studio/setup.sh --local so the cloned repo is used in editable mode and unsloth-zoo tracks main, matching the behavior of install.sh --local on a VM. install.sh --local is unchanged: it still sets SKIP_STUDIO_BASE=1, which short-circuits the local_repo branches in install_python_stack.py, so the overlay is not run twice. * studio: make --local overlays visible + guard empty arg parsing - setup.sh: gate the --local flag loop on $# > 0 (defensive against any shell that surfaces unset $@ under set -u) and emit a substep when local mode is detected so the user can confirm the flag was parsed. - install_python_stack.py: emit explicit _step lines before each overlay pip_install in both local_repo branches so overlays appear in the static log instead of being overwritten by the in-place progress bar.
This commit is contained in:
parent
05f46686de
commit
5262d93b58
3 changed files with 39 additions and 1 deletions
|
|
@ -972,6 +972,7 @@ def install_python_stack() -> int:
|
|||
req = REQ_ROOT / "no-torch-runtime.txt",
|
||||
)
|
||||
if local_repo:
|
||||
_step(_LABEL, f"overlaying local repo (editable): {local_repo}")
|
||||
pip_install(
|
||||
"Overlaying local repo (editable)",
|
||||
"--no-cache-dir",
|
||||
|
|
@ -980,6 +981,15 @@ def install_python_stack() -> int:
|
|||
local_repo,
|
||||
constrain = False,
|
||||
)
|
||||
_step(_LABEL, "overlaying unsloth-zoo from git main")
|
||||
pip_install(
|
||||
"Overlaying unsloth-zoo from git main",
|
||||
"--no-cache-dir",
|
||||
"--no-deps",
|
||||
"--force-reinstall",
|
||||
"unsloth-zoo @ git+https://github.com/unslothai/unsloth-zoo",
|
||||
constrain = False,
|
||||
)
|
||||
elif local_repo:
|
||||
# Local dev install: update deps from base.txt, then overlay the
|
||||
# local checkout as an editable install (--no-deps so torch is
|
||||
|
|
@ -994,6 +1004,7 @@ def install_python_stack() -> int:
|
|||
"unsloth-zoo",
|
||||
req = REQ_ROOT / "base.txt",
|
||||
)
|
||||
_step(_LABEL, f"overlaying local repo (editable): {local_repo}")
|
||||
pip_install(
|
||||
"Overlaying local repo (editable)",
|
||||
"--no-cache-dir",
|
||||
|
|
@ -1002,6 +1013,15 @@ def install_python_stack() -> int:
|
|||
local_repo,
|
||||
constrain = False,
|
||||
)
|
||||
_step(_LABEL, "overlaying unsloth-zoo from git main")
|
||||
pip_install(
|
||||
"Overlaying unsloth-zoo from git main",
|
||||
"--no-cache-dir",
|
||||
"--no-deps",
|
||||
"--force-reinstall",
|
||||
"unsloth-zoo @ git+https://github.com/unslothai/unsloth-zoo",
|
||||
constrain = False,
|
||||
)
|
||||
elif package_name != "unsloth":
|
||||
# Custom package name (e.g. roland-sloth for testing) — install directly
|
||||
_progress("base packages")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue