unsloth/docker
Daniel Han 1769204ade Dockerfile: arm64 DGX Spark NVRTC + ptxas fix (cu13 alongside cu128)
Empirically (cu128 wheel SASS list `sm_80;90;90a;100;100a;120;120a` on
aarch64) the cu128 wheel covers DGX Spark sm_121 via sm_120 binary
forward-compat. BUT two CPU-side compilers shipped at cu12.8 do not know
sm_121 and need a cu13 swap:

  (1) torch's bundled libnvrtc.so.12 from CUDA 12.8 rejects sm_121 as a
      --gpu-architecture. Symlinks libnvrtc.so.13 over it.

  (2) Triton's nvidia backend runs ptxas. Wheels older than 3.6.0 bundled
      cu12.8 ptxas which silently downgrades sm_121 to sm_80 (see
      triton-lang/triton#8335). Bump pin triton>=3.6.0 (3.6 bundles cu13
      ptxas) AND install cuda-nvcc-13-0 so the entrypoint can point
      TRITON_PTXAS_PATH at it as defense in depth.

Both fixes are arm64-only (gated on TARGETARCH, ~400 MB on the arm64
image; amd64 is untouched, no sm_121 hardware exists on x86_64). Neither
component talks to libcuda, so this does NOT bump the toolkit driver
floor away from cu128's 570+.

TRITON_PTXAS_PATH is set from the entrypoint (only when the cu13 ptxas
actually exists in the image) rather than via a Dockerfile ENV, because
ENV is unconditional and Triton errors out if TRITON_PTXAS_PATH points
at a nonexistent file.

Sources: martimramos/dgx-spark-ml-guide Challenge 14; triton-lang/triton
issue #8335; ptrblck PyTorch forum thread on sm_121 fwd-compat from
sm_120.
2026-05-24 11:35:07 +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: arm64 DGX Spark NVRTC + ptxas fix (cu13 alongside cu128) 2026-05-24 11:35:07 +00:00
entrypoint.sh Dockerfile: arm64 DGX Spark NVRTC + ptxas fix (cu13 alongside cu128) 2026-05-24 11:35:07 +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 smoke_test.py: import unsloth before unsloth_zoo / transformers / trl / peft 2026-05-24 08:11:37 +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