fix(pipelines): stop shipping a CUDA image for CPU-only embedding inference - #224
Open
Sharkyii wants to merge 3 commits into
Open
fix(pipelines): stop shipping a CUDA image for CPU-only embedding inference#224Sharkyii wants to merge 3 commits into
Sharkyii wants to merge 3 commits into
Conversation
google-oss-prow
Bot
requested review from
franciscojavierarceo and
tarekabouzeid
July 19, 2026 06:21
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
…h locally Signed-off-by: Sneh Kansagara <snehkansagara@gmail.com>
Signed-off-by: Sneh Kansagara <snehkansagara@gmail.com>
Signed-off-by: Sneh Kansagara <snehkansagara@gmail.com>
Sharkyii
force-pushed
the
fix/pipeline-cuda-bloat
branch
from
July 19, 2026 06:31
7ef39bb to
793c712
Compare
ArshVermaGit
reviewed
Aug 1, 2026
ArshVermaGit
left a comment
There was a problem hiding this comment.
Nice optimization. Switching the pipeline away from the unnecessary CUDA image reduces image bloat while keeping the embedding flow consistent with the shared service. The documentation and test updates round out the change nicely. LGTM.
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.
Fixes the Docker image bloat issue reported against
incremental-pipeline.pyandDockerfile.pipeline(both were still installing torch/sentence-transformers the plain way, which pulls the full CUDA build even though nothing in this cluster has a GPU).What changed
incremental-pipeline.py:chunk_and_embed_incrementalno longer loadssentence-transformerslocally on apytorch/pytorch:...-cuda12.1-cudnn8-runtimebase image. It now calls the shared in-cluster TEI embeddings service over HTTP, same askubeflow-pipeline.py/code-pipeline.py/issues-pipeline.pyalready do. Base image is now plainpython:3.11-slim.Dockerfile.pipeline: droppedsentence-transformers/torch and the model pre-download step entirely nothing inpipelines/needs local model inference anymore.Dockerfile.pipeline's old "bake PyTorch into the image" design, which no longer reflects reality.Tested it directly
torch --index-url https://download.pytorch.org/whl/cpuon one requirements line is silently ignored by pip, it still resolves the full ~500MB CUDA build. The flag only works as its own standalone line, and then it applies to every package below it, breaking anything not hosted on PyTorch's index. Migrating off local inference entirely sidesteps the problem rather than working around it.Testing
python incremental-pipeline.pycompiles the pipeline successfully (KFP compiler validates the full component graph).ruff check docs-agent-mcp/mcp-server tests docs-agent-mcp/pipelinespasses.Closes #198 / #199 (both were stale against a since-refactored path anyway).