fix(deps): make torch/ML stack opt-in instead of a mandatory install

requirements-amd.txt/requirements-nvidia.txt were pulling a multi-GB
torch wheel by default even though nothing in synapse/ imports torch,
transformers, accelerate, bitsandbytes, or PySide6 - dead weight that
made the pip batch fragile (one failed download could take unrelated
base deps down with it on a slow connection). Split the unused ML/GUI
stack out of requirements-base.txt into a new opt-in requirements-ml.txt,
and dropped the torch lines from the AMD/NVIDIA overlays and generator.

Also: recreate the venv if it exists but pip is missing, instead of
silently reusing a half-built one (ensurepip can fail during venv
creation and leave an interpreter with no pip).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Jon Wingender
2026-07-30 11:43:17 -05:00
co-authored by Claude Sonnet 5
parent 409e384be0
commit 3b0354735c
6 changed files with 40 additions and 22 deletions
+3 -4
View File
@@ -4,7 +4,6 @@
-r requirements-base.txt
# GPU Compute Stack
torch
torchaudio
torchvision
# Torch itself is opt-in — see requirements-ml.txt. The --index-url above is
# what makes `pip install -r requirements-amd.txt -r requirements-ml.txt`
# resolve torch as the ROCm build instead of CPU-only.