From 3906a72b08b006cabc58c28218166e35c2955f2f Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 2 Jun 2026 23:34:01 -0700 Subject: [PATCH] setup.sh: exclude WSL from native-Linux Spark CUDA-llama provision setup.sh runs during install.sh, so on WSL the new aarch64+NVIDIA provision block would foreground-build CUDA llama.cpp during the install -- blocking it and duplicating install.ps1's WSL background provision. Exclude WSL (grep microsoft /proc/version, same idiom setup.sh already uses) so this block is native-Linux (DGX Spark/GB10) only; WSL stays handled by install.ps1's background path. Co-Authored-By: Claude Opus 4.8 --- studio/setup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/studio/setup.sh b/studio/setup.sh index 30a448c513..5aa7f0497a 100755 --- a/studio/setup.sh +++ b/studio/setup.sh @@ -1415,10 +1415,16 @@ _have_cuda_llama_server() { } if [ "$_HOST_SYSTEM" = "Linux" ] \ && { [ "$_HOST_MACHINE" = "aarch64" ] || [ "$_HOST_MACHINE" = "arm64" ]; } \ + && ! grep -qi microsoft /proc/version 2>/dev/null \ && [ "${UNSLOTH_NO_LLAMA_CUDA:-0}" != "1" ] \ && command -v nvidia-smi >/dev/null 2>&1 \ && nvidia-smi -L 2>/dev/null | awk '/^GPU[[:space:]]+[0-9]+:/{found=1} END{exit !found}' \ && ! _have_cuda_llama_server; then + # NOTE: WSL2 is intentionally excluded above (grep microsoft /proc/version) -- + # under WSL the Windows installer (install.ps1) provisions the CUDA llama.cpp + # in the BACKGROUND after setup completes, so doing it here too would (a) run a + # heavy build in the FOREGROUND during install and (b) duplicate that work. + # This block is for NATIVE Linux (DGX Spark / GB10) only. # Resolve provision_llama_cuda.sh: prefer the copy shipped beside setup.sh # (packaged via studio/scripts/*.sh), then the local-dev repo, else fetch # the pinned raw copy from GitHub (mirrors install.ps1's WSL fetch) so the