Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Keep Unsloth Studio data after docker rm on CPU-only Docker hosts (#14540)

Nilay94885076bbfe
diff --git a/docker/DOCKERHUB.md b/docker/DOCKERHUB.md
index be79c9e6acd..4834252766e 100644
--- a/docker/DOCKERHUB.md
+++ b/docker/DOCKERHUB.md
@@ -93,7 +93,7 @@ docker run --rm --gpus all --ipc=host -v "$PWD":/workspace/host -w /workspace/ho
`latest` starts without a GPU on its own. Unsloth Studio chat with GGUF models, JupyterLab and the GGUF tooling work; training does not. `core` refuses to start without a GPU unless you opt in:
```bash
-docker run -d -p 8000:8000 -p 8888:8888 -v unsloth-workspace:/workspace unsloth/unsloth
+docker run -d --name unsloth -p 8000:8000 -p 8888:8888 -v unsloth-studio:/opt/unsloth-studio -v unsloth-workspace:/workspace unsloth/unsloth
docker run --rm -e UNSLOTH_ALLOW_CPU=1 unsloth/unsloth:core python -c "import unsloth"
```
diff --git a/tests/python/test_docker_hub_readme.py b/tests/python/test_docker_hub_readme.py
index 5efba7703c8..c0d1ce2ca56 100644
--- a/tests/python/test_docker_hub_readme.py
+++ b/tests/python/test_docker_hub_readme.py
@@ -8,6 +8,7 @@ from __future__ import annotations
import json
import os
import re
+import shlex
import shutil
import subprocess
from pathlib import Path
@@ -99,6 +100,29 @@ def test_the_quick_starts_keep_the_workspace():
), shells
+def _docker_runs(text: str) -> list[list[str]]:
+ joined = re.sub(r"\\\n", " ", text)
+ runs = []
+ for line in joined.splitlines():
+ for part in line.split("&&"):
+ part = part.strip()
+ if part.startswith("docker run"):
+ runs.append(shlex.split(part))
+ return runs
+
+
+def test_every_studio_run_keeps_the_studio_volume():
+ studio_images = {"unsloth/unsloth", "unsloth/unsloth:latest", "unsloth/unsloth:studio"}
+ checked = 0
+ for doc in (HUB_README, REPO_README):
+ for argv in _docker_runs(doc.read_text(encoding = "utf-8")):
+ if not studio_images.intersection(argv):
+ continue
+ checked += 1
+ assert "unsloth-studio:/opt/unsloth-studio" in argv, f"{doc.name}: {' '.join(argv)}"
+ assert checked >= 3
+
+
def _docker_sections(text: str) -> list[str]:
"""Returns every Docker section: the one with the run command is not always the first."""
sections = []