From 7c5292d9d422f862ef0a18c23747d9e2b4d002d2 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Fri, 16 Jan 2026 13:39:41 +0900 Subject: [PATCH] chore: pip install force-reinstall --- Dockerfile | 7 ++++++- docker/Dockerfile.database | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d38fef99173..e5fedc26955 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,10 @@ RUN pip install dist/*.whl # install dependencies as wheels RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt +# Remove old jaraco.context wheels and create correct version (GHSA-58pv-8j8x-9vj2) +RUN rm -f /wheels/jaraco.context-*.whl /wheels/jaraco_context-*.whl +RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ 'jaraco.context>=6.1.0' + # ensure pyjwt is used, not jwt RUN pip uninstall jwt -y RUN pip uninstall PyJWT -y @@ -71,7 +75,8 @@ RUN sed -i 's/\r$//' docker/install_auto_router.sh && chmod +x docker/install_au # Force patched jaraco.context version (GHSA-58pv-8j8x-9vj2) # Must be after install_auto_router.sh as aurelio-sdk may downgrade jaraco.context -RUN pip install --no-cache-dir --upgrade 'jaraco.context>=6.1.0' +# Using --force-reinstall --no-deps to ensure the correct version is installed +RUN pip install --no-cache-dir --upgrade --force-reinstall --no-deps 'jaraco.context>=6.1.0' # Generate prisma client RUN prisma generate diff --git a/docker/Dockerfile.database b/docker/Dockerfile.database index 645fa410634..598d5612371 100644 --- a/docker/Dockerfile.database +++ b/docker/Dockerfile.database @@ -42,6 +42,10 @@ RUN pip install dist/*.whl # install dependencies as wheels RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt +# Remove old jaraco.context wheels and create correct version (GHSA-58pv-8j8x-9vj2) +RUN rm -f /wheels/jaraco.context-*.whl /wheels/jaraco_context-*.whl +RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ 'jaraco.context>=6.1.0' + # Runtime stage FROM $LITELLM_RUNTIME_IMAGE AS runtime @@ -69,7 +73,8 @@ RUN sed -i 's/\r$//' docker/install_auto_router.sh && chmod +x docker/install_au # Force patched jaraco.context version (GHSA-58pv-8j8x-9vj2) # Must be after install_auto_router.sh as aurelio-sdk may downgrade jaraco.context -RUN pip install --no-cache-dir --upgrade 'jaraco.context>=6.1.0' +# Using --force-reinstall --no-deps to ensure the correct version is installed +RUN pip install --no-cache-dir --upgrade --force-reinstall --no-deps 'jaraco.context>=6.1.0' # ensure pyjwt is used, not jwt RUN pip uninstall jwt -y