Repository navigation
Install CPU-only torch in the backend image - #160
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PyPI's Linux torch wheels are the CUDA builds. In the backend image they added 3.3 GB of
nvidia-*packages and 0.9 GB of Triton. The image has no GPU to use them: Docker Desktop on a Mac passes none through, anddocker-compose.ymlreserves none. That made the API image 6.8 GB, and on 2026-11-06 it filled Docker's disk mid-build.The dependencies stage now installs torch from PyTorch's CPU index with
--no-deps. torch's dependencies resolve from PyPI in the followingpip install -r requirements.txt, because pip resolves an installed package's dependencies when a requirement (sentence-transformers) pulls it in; PyTorch's index mirrors of those packages can lag PyPI. The build then runspip check.Verification (linux/arm64 build)
Image 1.94 GB, down from 6.81 GB. torch 2.15.0+cpu (the same release as PyPI's latest), no
nvidia-*packages, andpip checkclean during the build.harrier-oss-v1-0.6b in this image:
engines.yamland the CHANGELOG now quote the 4.2 GB peak.LiteLLM 1.109.0rc1, filelock 4.2.9 and transformers 5.22.2 install as
requirements.txtdeclares.CI does not build the image. Its Python job still installs PyPI's torch through
make install, which is the same torch release.🤖 Generated with Claude Code