unsloth/studio
Daniel Han 9e26277cb8 setup.sh: skip CPU llama.cpp source build on WSL2 aarch64+NVIDIA (defer to background CUDA build)
On Windows-on-ARM + NVIDIA (DGX Spark / N1X "RTX Spark"), install.ps1 routes the
install through WSL2 and, after setup finishes, launches provision_llama_cuda.sh
in the BACKGROUND to install the CUDA toolkit + gcc-14 and build the real sm_121
CUDA llama-server, replacing whatever section 9 produced.

On a fresh WSL distro there is no nvcc yet, so section 9 could only ever build a
CPU-only server ("building (CPU, CUDA driver found but nvcc missing)") that the
background CUDA build immediately throws away -- slow and wasteful.

Skip the section-9 source build entirely on this exact path. Introduce a distinct
_LLAMA_CPP_DEFERRED state (NOT _LLAMA_CPP_DEGRADED) so:
  - the footer reports "GGUF engine: CUDA build running in background" (success),
    not "limited: llama.cpp unavailable";
  - the arm64 CPU-prebuilt last-resort does NOT fire (it gates on DEGRADED=true);
  - the install-failure exit 1 does NOT fire (it gates on DEGRADED=true).

Strictly gated -- defers only when ALL hold: WSL (grep microsoft /proc/version),
aarch64/arm64, an NVIDIA GPU is listed by nvidia-smi, nvcc is missing (PATH and
/usr/local/cuda*/bin), UNSLOTH_NO_LLAMA_CUDA != 1, no forced compile, no pinned
PR. Every other host (x86_64, native-Linux aarch64, nvcc-present, opt-out,
ROCm, macOS, non-NVIDIA) is byte-for-byte unaffected and still builds via
section 9 as before. install.ps1 is unchanged; it still builds CUDA in the
background, but now with no wasted CPU build first.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 04:30:36 -07:00
..
backend Configurable upload Cap studio (for training) (#5808) 2026-06-02 08:52:19 -07:00
frontend Guard model-load success path against mid-refresh cancellation (#5944) 2026-06-03 10:18:57 +04:00
scripts llama.cpp CUDA detection: handle dlopen-ed backend (split build layout) 2026-06-03 03:16:06 -07:00
src-tauri Studio: persist Tauri window size and maximized state across launches (#5799) 2026-06-02 09:26:15 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
install_llama_prebuilt.py Studio: cover B300 (sm_103) with the Linux prebuilt bundles (#5930) 2026-06-01 08:17:50 -07:00
install_python_stack.py studio: ROCm cleanups follow-up to #5301 (#5874) 2026-05-30 03:06:47 -07:00
LICENSE.AGPL-3.0 Add AGPL-3.0 license to studio folder 2026-03-09 19:36:25 +00:00
package-lock.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
package.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
setup.bat Final cleanup 2026-03-12 18:28:04 +00:00
setup.ps1 Studio: forward the resolved AMD gfx arch to the prebuilt installer (#5923) 2026-06-01 06:55:35 -07:00
setup.sh setup.sh: skip CPU llama.cpp source build on WSL2 aarch64+NVIDIA (defer to background CUDA build) 2026-06-03 04:30:36 -07:00
Unsloth_Studio_Colab.ipynb Fix/studio colab proxy and iframe - Unsloth Studio not loading in Colab (iframe "refused to connect" and wrong URL) (#5844) 2026-05-28 23:54:48 -07:00