unsloth/docker
danielhanchen 29a6bde4d1 Address reviewer findings on PR #5748: 4 release-path bugs
Round-trip with the reviewer.py 12-persona pass surfaced four real
issues. Fix all four in this PR so the new Docker release path is
self-consistent.

1. docker/smoke_test.py used `import xformers` unconditionally, which
   guarantees a failure on arm64 (built with `[huggingface]` extras to
   skip xformers since it has no aarch64 cu128 wheel). Wrap the import
   in try/except so the same smoke script validates both arches.

2. unsloth/_gpu_init.py forced `TORCHINDUCTOR_COMPILE_THREADS=1` before
   `import unsloth_zoo`, but `patch_torch_compile` in unsloth_zoo main
   pops that env var in non-debug mode. After unsloth_zoo init the
   guard was effectively undone, so cgroup-pinned `docker --gpus
   '"device=N"'` containers still spawned the Inductor subprocess pool
   that cannot enumerate the GPU. Set `torch._inductor.config.
   compile_threads = 1` directly post-import-torch and re-populate the
   env var so `determine_compile_threads()` in the zoo options dict
   also returns 1, regardless of whether the zoo-side fix from PR #694
   has shipped yet.

3. docker-publish.yml UNSLOTH_REF build-arg defaulted to `'main'` for
   tag pushes and scheduled runs, so a `v1.2.3` release image would
   contain whatever `main` happened to be at build time, not v1.2.3.
   Pick the tag's `github.ref_name` for tag events and `github.sha`
   for branch/schedule events.

4. The smoke-test job pulled `:latest` regardless of which tag the
   merge job had just published, so tag/schedule/sha publishes were
   never actually validated. Re-run docker/metadata-action with the
   same config the merge job used, then smoke-test the first tag from
   its output.

All four changes are gated and backwards-compatible.
2026-05-24 14:05:36 +00:00
..
.dockerignore Add entrypoint with GPU pre-flight checks + opinionated run.sh wrapper 2026-05-24 07:04:48 +00:00
build.sh Add Docker build for Blackwell that runs on any NVIDIA GPU host 2026-05-24 06:52:58 +00:00
Dockerfile Dockerfile: re-upgrade numpy after vLLM install (2.2.6 wheel is broken) 2026-05-24 13:24:45 +00:00
Dockerfile.studio docker: add Dockerfile.studio extending the Blackwell image with Unsloth Studio 2026-05-24 14:00:43 +00:00
entrypoint.sh entrypoint.sh: correct driver-floor message (570+ unconditionally on cu128) 2026-05-24 11:36:36 +00:00
freeze.sh Add Docker build for Blackwell that runs on any NVIDIA GPU host 2026-05-24 06:52:58 +00:00
hf_pull.sh hf_{push,pull}.sh: use new hf CLI, fall back to deprecated huggingface-cli 2026-05-24 09:40:22 +00:00
hf_push.sh hf_{push,pull}.sh: use new hf CLI, fall back to deprecated huggingface-cli 2026-05-24 09:40:22 +00:00
run.sh Add entrypoint with GPU pre-flight checks + opinionated run.sh wrapper 2026-05-24 07:04:48 +00:00
setup_qemu.sh Add linux/arm64 (DGX Spark / Grace) support via QEMU at build time 2026-05-24 10:34:59 +00:00
smoke_test.py Address reviewer findings on PR #5748: 4 release-path bugs 2026-05-24 14:05:36 +00:00
test_locally.sh Add linux/arm64 (DGX Spark / Grace) support via QEMU at build time 2026-05-24 10:34:59 +00:00