fix(pipelines): stop shipping a CUDA image for CPU-only embedding inference - #224
Conversation
…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>
7ef39bb to
793c712
Compare
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.
|
Hi @tarekabouzeid , This does fix our stale sentence-transformer dependencies , Can you review and merge in. |
|
Hi @chasecadet , Please look at it once. |
Match versions already pinned in docs-agent-mcp/pipelines/requirements.txt. Signed-off-by: Sneh Kansagara <snehkansagara@gmail.com>
|
@tarekabouzeid PTAL, i have updated the changes |
|
Thanks @Sharkyii |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tarekabouzeid The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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).