unsloth/docker
Daniel Han 00cbc82513 smoke_test.py: import unsloth before unsloth_zoo / transformers / trl / peft
unsloth_zoo/__init__.py guards against being imported standalone:

  if "UNSLOTH_IS_PRESENT" not in os.environ:
      raise ImportError("Please install Unsloth via `pip install unsloth`!")

The env var is set by unsloth/__init__.py at import time, so importing
unsloth must happen first. The old check_imports() imported xformers,
bnb, transformers, trl, peft, then unsloth_zoo -- which fired the guard
because unsloth had not been imported yet.

Reorder check_imports() to import unsloth (and unsloth_zoo) first, then
the rest. check_unsloth_import() becomes a thin re-import to keep the
"FastLanguageModel reachable" banner in the output.

Same fix the unsloth README has been recommending for years: "import
unsloth at the top of your file, before transformers/trl/peft."
2026-05-24 08:11:37 +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: drop system-python pip/uv bootstrap (PEP 668) 2026-05-24 08:01:55 +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 smoke_test.py: import unsloth before unsloth_zoo / transformers / trl / peft 2026-05-24 08:11:37 +00:00
test_locally.sh test_locally.sh: pre-flight check for docker daemon connectivity 2026-05-24 07:50:30 +00:00