Bug Description
kagent-feast-mcp/mcp-server/requirements.txt lists torch without specifying a build variant. The Dockerfile uses python:3.10-slim — a CPU-only base image with no CUDA drivers or GPU support.
What happens
pip install torch without a variant index installs the full CUDA-enabled wheel (~2.5GB). The container has no GPU and can never use CUDA. The embedding model (all-mpnet-base-v2) runs on CPU regardless, making the entire CUDA payload dead weight.
Impact
- Final Docker image is ~3.5-4GB instead of under 1GB
docker pull and cold-start time are 3-4x longer than necessary
- CI/CD pipelines building this image waste significant bandwidth and compute on every run
- No functional benefit — the model runs on CPU either way
Root Cause
# kagent-feast-mcp/mcp-server/requirements.txt
torch # installs full CUDA wheel (~2.5GB) by default
FROM python:3.10-slim # CPU-only, no CUDA drivers
Proposed Fix
Pin torch to the official CPU-only wheel using PyTorch's CPU index:
torch --index-url https://download.pytorch.org/whl/cpu
pymilvus
sentence-transformers
fastmcp
This brings torch down to ~200MB, reducing the final image size from ~3.5GB to under 1GB with no change in runtime behavior.
I will submit a PR with this fix.
Bug Description
kagent-feast-mcp/mcp-server/requirements.txtliststorchwithout specifying a build variant. The Dockerfile usespython:3.10-slim— a CPU-only base image with no CUDA drivers or GPU support.What happens
pip install torchwithout a variant index installs the full CUDA-enabled wheel (~2.5GB). The container has no GPU and can never use CUDA. The embedding model (all-mpnet-base-v2) runs on CPU regardless, making the entire CUDA payload dead weight.Impact
docker pulland cold-start time are 3-4x longer than necessaryRoot Cause
# kagent-feast-mcp/mcp-server/requirements.txt torch # installs full CUDA wheel (~2.5GB) by defaultFROM python:3.10-slim # CPU-only, no CUDA driversProposed Fix
Pin torch to the official CPU-only wheel using PyTorch's CPU index:
This brings torch down to ~200MB, reducing the final image size from ~3.5GB to under 1GB with no change in runtime behavior.
I will submit a PR with this fix.