install.ps1: UNSLOTH_INSTALL_REF also drives the WSL unsloth install
So a branch can be tested end-to-end pre-merge: when UNSLOTH_INSTALL_REF is set (not main), pass install.sh `--package git+https://github.com/unslothai/unsloth@<ref>` so the WSL studio venv carries THAT ref's studio/setup.sh + unsloth Python patches (otherwise install.sh installs released PyPI unsloth and the branch's setup.sh -- e.g. the WSL CPU-build skip -- never runs). Default (ref = main) is byte-identical to before. The git URL has no spaces, so it survives PowerShell -> wsl.exe -> bash -lc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
b291c13a97
commit
abb99d52ca
1 changed files with 9 additions and 1 deletions
10
install.ps1
10
install.ps1
|
|
@ -1541,7 +1541,15 @@ shell.Run cmd, 0, False
|
|||
try { & wsl.exe --install -d $distro --no-launch } catch {}
|
||||
}
|
||||
substep "installing Unsloth Studio inside WSL '$distro' with full GPU (this downloads PyTorch)..." "Cyan"
|
||||
$wslInstall = 'export DEBIAN_FRONTEND=noninteractive; apt-get update -y >/dev/null 2>&1; apt-get install -y build-essential cmake git curl pciutils >/dev/null 2>&1; curl -fsSL https://unsloth.ai/install.sh | sh'
|
||||
# When UNSLOTH_INSTALL_REF is a branch/tag/sha (not "main"), install unsloth FROM that
|
||||
# ref via install.sh's --package, so the WSL studio package carries THIS ref's
|
||||
# studio/setup.sh + unsloth Python patches. Otherwise install.sh pulls released PyPI
|
||||
# unsloth and the branch's setup.sh (e.g. the WSL CPU-build skip) would not run
|
||||
# pre-merge. Default (ref = main) is byte-identical to before: plain `... | sh`.
|
||||
# The git URL has no spaces, so it passes cleanly PowerShell -> wsl.exe -> bash -lc.
|
||||
$_instRef = Get-UnslothInstallRef
|
||||
$_pkgArg = if ($_instRef -eq 'main') { '' } else { ' -s -- --package git+https://github.com/unslothai/unsloth@' + $_instRef }
|
||||
$wslInstall = 'export DEBIAN_FRONTEND=noninteractive; apt-get update -y >/dev/null 2>&1; apt-get install -y build-essential cmake git curl pciutils >/dev/null 2>&1; curl -fsSL https://unsloth.ai/install.sh | sh' + $_pkgArg
|
||||
# install.sh writes diagnostics to stderr and may exit non-zero on the optional llama.cpp
|
||||
# prebuilt step (no aarch64 prebuilt exists) -- that must NOT abort us under -ErrorAction Stop,
|
||||
# since torch + unsloth + Studio still install. Lower EAP around the call (same idiom as above).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue