unsloth/studio
Daniel Han 9c0372d132 bun: restore bun-first / npm-fallback install (both frozen-lockfile)
PR 5479 dropped Bun support because no bun.lock was committed. With
the bun.lock files now committed for all three Studio install
surfaces (previous commit), Bun --frozen-lockfile becomes a
viable fast path again -- ~5-10x faster than npm ci in practice
(measured locally: frontend 1.4s vs 8s, oxc 35ms vs 371ms, studio
14ms vs 444ms).

Install logic per surface (studio/setup.sh, studio/setup.ps1,
build.sh):

  1. If bun.lock exists AND `bun` is on PATH:
       try `bun install --frozen-lockfile`
       verify critical binaries are present (tsc + vite for frontend,
       oxc-parser for oxc validator) -- workaround for the known
       bun-cache-corruption bug where install can exit 0 but leave
       binaries missing
       on validation failure: rm -rf node_modules + clear bun cache,
       fall through to npm ci
  2. Else (no bun.lock, no bun, or bun failed):
       `npm ci` against the committed package-lock.json

Both paths run lockfile-strict, so the install is byte-reproducible
from whichever lockfile the chosen package manager understands. The
build always runs through Node (`npm run build`) -- avoids bun
runtime quirks on some platforms.

Bun auto-install via `npm install -g bun` is NOT restored: a user
who wants the speed-up installs Bun themselves, and the npm ci path
remains the default-available install route. This matches the
upstream Studio docs' install instructions.
2026-05-19 04:03:37 +00:00
..
backend bun: commit bun.lock for the three Studio install surfaces 2026-05-19 04:01:14 +00:00
frontend bun: commit bun.lock for the three Studio install surfaces 2026-05-19 04:01:14 +00:00
src-tauri studio: expose launcher capability bits on unauth /api/health (#5486) 2026-05-17 21:29:24 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
bun.lock bun: commit bun.lock for the three Studio install surfaces 2026-05-19 04:01:14 +00:00
install_llama_prebuilt.py tests/studio: lock in Windows GPU detection fix (#5106) with a synthetic CI test (#5376) 2026-05-18 00:06:01 -07:00
install_python_stack.py studio: skip flash-attn install on Blackwell GPUs (sm_100+) (#5420) 2026-05-14 18:13:50 +04: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: address 4x Opus reviewer findings on frozen-lockfile installs 2026-05-16 11:11:32 +00:00
package.json ci: address 4x Opus reviewer findings on frozen-lockfile installs 2026-05-16 11:11:32 +00:00
setup.bat Final cleanup 2026-03-12 18:28:04 +00:00
setup.ps1 bun: restore bun-first / npm-fallback install (both frozen-lockfile) 2026-05-19 04:03:37 +00:00
setup.sh bun: restore bun-first / npm-fallback install (both frozen-lockfile) 2026-05-19 04:03:37 +00:00
Unsloth_Studio_Colab.ipynb studio: add --local to setup.sh + overlay unsloth-zoo from git main (#5252) 2026-05-02 08:51:56 +04:00