diff --git a/Dockerfile b/Dockerfile index e46a9d6b8..ef81fe645 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,6 @@ # Runtime image ARG LITELLM_RUNTIME_IMAGE=python:3.9-slim -# Builder stage -FROM $LITELLM_BUILD_IMAGE as builder - - @@ -35,8 +34,12 @@ RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt # Runtime stage FROM $LITELLM_RUNTIME_IMAGE as runtime @@ -17,9 +13,13 @@ RUN ls -la /app # Copy the built wheel from the builder stage to the runtime stage; assumes only one wheel file is present COPY --from=builder /app/dist/*.whl . - @@ -45,9 +48,17 @@ COPY --from=builder /wheels/ /wheels/ +COPY --from=builder /wheels/ /wheels/ + # Install the built wheel using pip; again using a wildcard if it's the only file -RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl && rm -rf /wheels +RUN pip install --no-cache-dir --find-links=/wheels/ -r requirements.txt \ + && pip install *.whl \ + && rm -f *.whl + # Check if the with_database argument is set to 'true' RUN echo "Value of with_database is: ${with_database}"