install.ps1/uninstall.ps1: add UNSLOTH_INSTALL_REF + fix WSL symlink uninstall hole
install.ps1: fetch repo-versioned WSL-fallback assets (provision_llama_cuda.sh, unsloth.ico) from a configurable git ref via new UNSLOTH_INSTALL_REF env var (defaults to main, so existing users are byte-for-byte unaffected). Lets the ARM64+NVIDIA WSL-fallback GPU path be exercised end-to-end on a branch before it merges (provision_llama_cuda.sh does not exist on main until then). uninstall.ps1: the WSL cleanup rm -rf'd /root/.unsloth but left the ~/.local/bin/unsloth launcher symlink dangling, so `unsloth` still resolved on PATH after an uninstall. Also remove /root/.local/bin/unsloth and /home/*/.local/bin/unsloth. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
cc31b87850
commit
f102eccaa4
2 changed files with 20 additions and 4 deletions
|
|
@ -373,7 +373,11 @@ function Uninstall-UnslothStudio {
|
|||
# matches this very bash -lc (its argv contains the pattern) and would SIGKILL
|
||||
# the shell before a trailing rm -- so remove files first (guaranteed), then
|
||||
# best-effort kill via fuser by port (does not self-match) + pkill.
|
||||
$_clean = 'rm -rf /root/.unsloth /home/*/.unsloth /root/llama-cuda /root/provision_llama_cuda.sh /root/llama_cuda_build.log 2>/dev/null; fuser -k 8888/tcp 2>/dev/null; pkill -9 -f unsloth_studio 2>/dev/null; pkill -9 -f llama-server 2>/dev/null; true'
|
||||
# Also remove the `unsloth` launcher symlink install.sh drops at
|
||||
# ~/.local/bin/unsloth -> <venv>/bin/unsloth. rm -rf of ~/.unsloth
|
||||
# above deletes its target but leaves the symlink dangling, so the
|
||||
# `unsloth` command still resolves on PATH after an uninstall.
|
||||
$_clean = 'rm -rf /root/.unsloth /home/*/.unsloth /root/llama-cuda /root/provision_llama_cuda.sh /root/llama_cuda_build.log 2>/dev/null; rm -f /root/.local/bin/unsloth /home/*/.local/bin/unsloth 2>/dev/null; fuser -k 8888/tcp 2>/dev/null; pkill -9 -f unsloth_studio 2>/dev/null; pkill -9 -f llama-server 2>/dev/null; true'
|
||||
$_cands = @('', 'Ubuntu', 'Ubuntu-24.04', 'Ubuntu-22.04', 'Debian')
|
||||
if ($env:UNSLOTH_WSL_DISTRO) { $_cands = @($env:UNSLOTH_WSL_DISTRO) + $_cands }
|
||||
$_done = @{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue