fix(brain): CPU-only torch — verhindert 5 GB CUDA-Bloat im Brain-Image
sentence-transformers zieht torch als Dependency, und der Default-Wheel auf x86_64-linux ist die CUDA-Variante mit allen NVIDIA-Libs (nvidia-cudnn, nvidia-cublas, cuda-toolkit, triton, ...). ~5 GB pro Build-Layer, frisst die 22-GB-VM auf. Fix: torch CPU-Wheel explizit zuerst installieren. Damit ist die torch-Dependency erfuellt wenn sentence-transformers spaeter kommt, und die CUDA-Libs werden nie gezogen. Brain laeuft eh komplett auf CPU (MiniLM-Embeddings ~120 MB), GPU-Bloat war reine Disk-Verschwendung. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# CPU-only torch zuerst — sonst zieht sentence-transformers den Default
|
||||
# torch-Wheel der ~5 GB CUDA-Libs (nvidia-cudnn, nvidia-cublas, cuda-toolkit,
|
||||
# triton, ...) als Dependencies einsaugt. Brain laeuft komplett auf CPU
|
||||
# (MiniLM-Embeddings ~120 MB), wir brauchen das alles nicht.
|
||||
RUN pip install --no-cache-dir torch==2.5.1 \
|
||||
--index-url https://download.pytorch.org/whl/cpu
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user