studio: add --no-deps to base.txt install in Docker paths

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.
This commit is contained in:
Roland Tannous 2026-05-08 00:40:06 +04:00
commit 0627af1a3c

View file

@ -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",