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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user