unsloth/docker
Daniel Han 8344fa0a56 test_locally.sh: use nbformat directly, drop fragile jupyter nbconvert call
`jupyter nbconvert --to script nb.ipynb --output nb 2>/dev/null` was
silently exiting 0 without producing the output file in some
environments (likely because jupyter/jupyter_core wasn't on PATH or
nbconvert's --output handling differed across versions). The 2>/dev/null
hid the underlying error, and `set -e` did not catch the missing-output
case because nbconvert itself returned 0.

Switch to a direct nbformat-based conversion:

  pip install -q nbformat
  python -c "import nbformat; nb=nbformat.read('nb.ipynb', as_version=4);
             code='\n\n'.join(c.source for c in nb.cells if c.cell_type == 'code')
             open('nb.py','w').write(code + '\n')"

Smaller dep set, no shell-out to a jupyter wrapper script, and an
explicit `test -s nb.py` afterwards catches any silent failure
before downstream steps try to read the file.

Reproduces the failure on RTX PRO 6000 Blackwell (sm_120, docker
29.2.1, ubuntu 24.04) where nbconvert's CLI silently no-op'd.
2026-05-24 10:00: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 Expand arch list to every current x86_64 NVIDIA CC per developer.nvidia.com/cuda/gpus 2026-05-24 08:31:15 +00:00
entrypoint.sh Expand arch list to every current x86_64 NVIDIA CC per developer.nvidia.com/cuda/gpus 2026-05-24 08:31:15 +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
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: use nbformat directly, drop fragile jupyter nbconvert call 2026-05-24 10:00:37 +00:00