unsloth/docker
Daniel Han acbb16c8a1 Add docker/test_locally.sh: one-shot end-to-end Docker validation
Single bash script that runs the full validation flow against the image:

  1. Host pre-flight: docker version, nvidia-smi, nvidia-container-toolkit
     runtime registered with docker.
  2. Build the image (auto-detects the build context -- current dir,
     docker/ subdir, or clones the docker-blackwell-build branch into
     /tmp/unsloth-pr/).
  3a. Smoke test: 5-step LoRA on Llama-3.2-1B-Instruct-bnb-4bit.
  3b. Real workload: gpt-oss-20B fine-tuning notebook from
      unslothai/notebooks, patched to max_steps=10, with the three
      pre-train demo generations dropped for brevity. Auto-installs
      triton_kernels at the SHA the upstream notebook pins for MXFP4.

All output is teed to /tmp/unsloth-docker-test/ (or --log-dir).

Usage:
  bash docker/test_locally.sh                  # full run, ~15 min
  bash docker/test_locally.sh --skip-notebook  # blocks 1-3a only, ~3 min
  bash docker/test_locally.sh --skip-build     # reuse existing TAG
  TAG=my:tag HF_TOKEN=hf_xxx bash docker/test_locally.sh

Each block fails fast with the exact log path to paste back.
2026-05-24 07:14:47 +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 Add entrypoint with GPU pre-flight checks + opinionated run.sh wrapper 2026-05-24 07:04:48 +00:00
entrypoint.sh Add entrypoint with GPU pre-flight checks + opinionated run.sh wrapper 2026-05-24 07:04:48 +00:00
freeze.sh Add Docker build for Blackwell that runs on any NVIDIA GPU host 2026-05-24 06:52:58 +00:00
run.sh Add entrypoint with GPU pre-flight checks + opinionated run.sh wrapper 2026-05-24 07:04:48 +00:00
smoke_test.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-05-24 06:54:37 +00:00
test_locally.sh Add docker/test_locally.sh: one-shot end-to-end Docker validation 2026-05-24 07:14:47 +00:00