From 0627af1a3c82ebdacf581cb0147d4304970d75aa Mon Sep 17 00:00:00 2001 From: Roland Tannous Date: Fri, 8 May 2026 00:40:06 +0400 Subject: [PATCH] studio: add --no-deps to base.txt install in Docker paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'Updating base packages' pip_install calls in the elif local_repo and final else branches resolved base.txt's transitive deps without --no-deps. On Docker builds with local-version torch (e.g. torch==2.11.0+cu130), uv treats the +cu130 segment as non-canonical PEP 440 and decides the installed torch doesn't satisfy a bare 'torch' constraint, then pulls PyPI's torch==2.10.0 (CPU-only) and uninstalls the cu130 build. This breaks every CUDA-dependent package downstream. This branch is named feature/docker-studio-* — torch and every other CUDA-adjacent package is pre-installed and pinned by the Dockerfile. There's no need to resolve transitive deps; --upgrade-package already targets only unsloth + unsloth-zoo as intended. --- studio/install_python_stack.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/studio/install_python_stack.py b/studio/install_python_stack.py index dca0998626..e4dfcf6c3a 100644 --- a/studio/install_python_stack.py +++ b/studio/install_python_stack.py @@ -1106,10 +1106,17 @@ def install_python_stack() -> int: # Local dev install: update deps from base.txt, then overlay the # local checkout as an editable install (--no-deps so torch is # never re-resolved). + # --no-deps on the base.txt install too: this branch is for Docker + # builds where torch + every CUDA-adjacent package is already pinned + # and installed; resolving base.txt's deps risks pulling PyPI's + # CPU-only torch over our local-version cu* build (the +cu130 etc. + # local segment is non-canonical PEP 440 and uv may treat it as + # not-satisfying an unconstrained `torch` requirement). _progress("base packages") pip_install( "Updating base packages", "--no-cache-dir", + "--no-deps", "--upgrade-package", "unsloth", "--upgrade-package", @@ -1146,10 +1153,17 @@ def install_python_stack() -> int: # Update path: upgrade only unsloth + unsloth-zoo while preserving # existing torch/CUDA installations. Torch is pre-installed by # install.sh / setup.ps1; --upgrade-package targets only base pkgs. + # --no-deps: this branch is for Docker builds where torch + every + # CUDA-adjacent package is already pinned and installed by the + # Dockerfile; resolving base.txt's transitive deps risks pulling + # PyPI's CPU-only torch over our local-version cu* build (the + # +cu130 etc. local segment is non-canonical PEP 440 and uv may + # treat it as not-satisfying an unconstrained `torch` requirement). _progress("base packages") pip_install( "Updating base packages", "--no-cache-dir", + "--no-deps", "--upgrade-package", "unsloth", "--upgrade-package",