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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Docker: keep the startup health checks off the HTTP proxy (#11157)
Nilay4f9643341b07
diff --git a/docker/studio_password.sh b/docker/studio_password.shindex 59d09c75a2d..ea96a1dcc76 100755--- a/docker/studio_password.sh+++ b/docker/studio_password.sh@@ -81,10 +81,10 @@ echo "Unsloth Studio login -> ${STUDIO_LINE}"studio_ok=""; jupyter_ok=""deadline=$(( $(date +%s) + READY_WAIT ))while :; do- if [[ -z "$studio_ok" ]] && curl -sf -o /dev/null --max-time 3 "http://127.0.0.1:${UNSLOTH_STUDIO_PORT:-8000}/api/health"; then+ if [[ -z "$studio_ok" ]] && curl -sf -o /dev/null --max-time 3 --noproxy '*' "http://127.0.0.1:${UNSLOTH_STUDIO_PORT:-8000}/api/health"; thenstudio_ok=1fi- if [[ -z "$jupyter_ok" ]] && curl -sf -o /dev/null --max-time 3 "http://127.0.0.1:${JUPYTER_PORT}/login"; then+ if [[ -z "$jupyter_ok" ]] && curl -sf -o /dev/null --max-time 3 --noproxy '*' "http://127.0.0.1:${JUPYTER_PORT}/login"; thenjupyter_ok=1fi{ [[ -n "$studio_ok" && -n "$jupyter_ok" ]] || (( $(date +%s) >= deadline )); } && breakdiff --git a/docker/unsloth_jupyter_tunnel.sh b/docker/unsloth_jupyter_tunnel.shindex 52082c96e43..c01e21aa695 100755--- a/docker/unsloth_jupyter_tunnel.sh+++ b/docker/unsloth_jupyter_tunnel.sh@@ -22,7 +22,7 @@ PORT="${JUPYTER_PORT:-8888}"echo "[jupyter-tunnel] waiting for JupyterLab on port ${PORT} ..."for _ in $(seq 1 90); do- if curl -fsS -o /dev/null "http://localhost:${PORT}/login" 2>/dev/null; then+ if curl -fsS -o /dev/null --noproxy '*' "http://localhost:${PORT}/login" 2>/dev/null; thenbreakfisleep 2diff --git a/tests/python/test_docker_studio_password_banner.py b/tests/python/test_docker_studio_password_banner.pyindex e97883ad722..8c5b9793479 100644--- a/tests/python/test_docker_studio_password_banner.py+++ b/tests/python/test_docker_studio_password_banner.py@@ -90,11 +90,12 @@ def _run(env: dict | None = None,wait: str = "3",services_up: bool = True,+ curl: str | None = None,) -> subprocess.CompletedProcess:"""Run the shipped script against *home*, with curl stubbed: the ready probesmust never reach a real Studio on the test host."""bin_dir = home / "stub-bin"- _stub(bin_dir, "curl", "exit 0\n" if services_up else "exit 7\n")+ _stub(bin_dir, "curl", curl or ("exit 0\n" if services_up else "exit 7\n"))# the admin row is "committed" unless the test parks a not-initialized marker_stub(bin_dir, "unsloth-studio-run", f'[[ -e "{home / "not-initialized"}" ]] && exit 1\nexit 0\n'@@ -180,6 +181,43 @@ def test_services_that_never_answer_are_reported_not_hidden(tmp_path: Path):assert res.stdout.count("not answering") == 2+@behavioural+def test_the_ready_probes_bypass_a_container_wide_proxy(tmp_path: Path):+ log = tmp_path / "curl.log"+ res = _run(+ tmp_path,+ env = {"UNSLOTH_STUDIO_PASSWORD_STATE": "stored", "STUB_LOG": str(log)},+ curl = 'echo "$*" >> "$STUB_LOG"\nexit 0\n',+ )+ assert res.returncode == 0, res.stderr+ calls = log.read_text().splitlines()+ assert any(c.endswith("--noproxy * http://127.0.0.1:8000/api/health") for c in calls), calls+ assert any(c.endswith("--noproxy * http://127.0.0.1:8888/login") for c in calls), calls+++@behavioural+def test_the_jupyter_tunnel_probe_bypasses_a_container_wide_proxy(tmp_path: Path):+ bin_dir = tmp_path / "stub-bin"+ log = tmp_path / "curl.log"+ _stub(bin_dir, "curl", 'echo "$*" >> "$STUB_LOG"\nexit 0\n')+ # the script's first candidate, so a real /usr/local/bin/cloudflared is never run+ _stub(tmp_path / "bin", "cloudflared", 'echo "STUB-CLOUDFLARED $*"\n')+ e = _clean_env(bin_dir)+ e.update(UNSLOTH_JUPYTER_CLOUDFLARE = "1", UNSLOTH_STUDIO_HOME = str(tmp_path), STUB_LOG = str(log))+ res = subprocess.run(+ ["bash", str(DOCKER / "unsloth_jupyter_tunnel.sh")],+ capture_output = True,+ text = True,+ env = e,+ timeout = 60,+ )+ assert res.returncode == 0, res.stderr+ assert "STUB-CLOUDFLARED tunnel" in res.stdout, res.stdout+ assert log.read_text().splitlines() == [+ "-fsS -o /dev/null --noproxy * http://localhost:8888/login"+ ]++@behaviouraldef test_a_crlf_file_does_not_leak_the_cr_into_the_credential(tmp_path: Path):auth = tmp_path / "auth"