Skip to content

Commit ba9b93e

Browse files
committed
Merge branch 'main' into update-nextjs-7
2 parents e9b495e + 683dae6 commit ba9b93e

2 files changed

Lines changed: 452 additions & 671 deletions

File tree

backend/pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ dependencies = [
104104
"opencv-python-headless>=4.10.0.84",
105105
"psycopg[c]==3.2.12",
106106
"sentence-transformers>=3.0.0",
107+
# Declared directly so [tool.uv.sources] binds torch to the CPU index
108+
# (sources only apply to direct deps). Otherwise it's transitive via
109+
# sentence-transformers. See [tool.uv.sources] below.
110+
"torch>=2.12.1",
107111
"scikit-learn>=1.5.0",
108112
"bertopic>=0.16.0",
109113
"nltk>=3.9.4",
@@ -135,3 +139,15 @@ dev = [
135139
"typer>=0.12.3",
136140
"django-debug-toolbar>=5.0.1",
137141
]
142+
143+
# Pull torch from the CPU-only PyTorch index. torch 2.12 declares CUDA deps
144+
# for all Linux platforms (incl. arm64), which the universal lock would
145+
# otherwise install — adding ~2.7GB of unusable nvidia/cuda wheels to the
146+
# image. The +cpu wheels declare no nvidia deps. See #4672.
147+
[tool.uv.sources]
148+
torch = [{ index = "pytorch-cpu" }]
149+
150+
[[tool.uv.index]]
151+
name = "pytorch-cpu"
152+
url = "https://download.pytorch.org/whl/cpu"
153+
explicit = true

0 commit comments

Comments
 (0)