From 44579d6830852305b7f8790a6e01a966be342ace Mon Sep 17 00:00:00 2001 From: CM Consultor Date: Thu, 6 Aug 2026 22:47:08 +0000 Subject: [PATCH] fix: install pip via ensurepip before installing requirements The litellm/litellm base image uses uv to manage a virtualenv at /app/.venv, which does not include pip. Running ensurepip first bootstraps pip inside the venv so we can install numpy, scikit-learn and other extra dependencies. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index eb2b155..04851a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,7 +46,8 @@ COPY --chown=litellm:litellm \ # 6. Install the extra Python deps that the router needs: # - numpy (for cosine similarity) # - scikit-learn (for the Jaccard fallback) -RUN python3 -m pip install --no-cache-dir -r requirements.txt +RUN python3 -m ensurepip --upgrade && \ + python3 -m pip install --no-cache-dir -r requirements.txt # 7. Expose the port used by LiteLLM EXPOSE 4000