camel-oasis (dep of camel-ai/sentence-transformers) pulls in torch on linux-x86_64, which drags several GB of nvidia-cuda-* / cudnn / triton packages into the production image even though this deployment never runs an LLM locally — all LLM calls go through an API (OpenAI-compatible) and the server has no GPU. The nvidia-* packages are pure bloat. After 'uv sync', uninstall all nvidia-* runtime libs + triton (torch itself stays as a CPU runtime). Then verify the stripped env still imports psycopg, torch, sentence-transformers and the app, so the build fails loudly if the strip breaks anything instead of failing silently at container runtime. Verified locally (no CUDA libs present): psycopg/torch/sentence_transformers/ create_app all import fine.
4.8 KiB
4.8 KiB