Skip to content

Switchyard lets LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility - enabling flexible model selection, benchmarking, and cost/performance optimization.

Rust

docker(litellm): bind-mount wheels instead of COPY+rm (#581)

Sujeito Operator7a23989cbe18
diff --git a/examples/litellm/deployment/Dockerfile b/examples/litellm/deployment/Dockerfile
index 482a77b17..ade4cd67a 100644
--- a/examples/litellm/deployment/Dockerfile
+++ b/examples/litellm/deployment/Dockerfile
@@ -23,9 +23,8 @@ FROM ghcr.io/astral-sh/uv:0.8.15 AS uv
FROM ghcr.io/berriai/litellm:v1.97.0
COPY --from=uv /uv /usr/local/bin/uv
-COPY --from=switchyard-builder /wheels /wheels
-RUN uv pip install --python /app/.venv/bin/python --no-deps /wheels/*.whl \
- && rm -rf /wheels
+RUN --mount=type=bind,from=switchyard-builder,source=/wheels,target=/wheels \
+ uv pip install --python /app/.venv/bin/python --no-deps /wheels/*.whl
COPY examples/litellm/src /app/switchyard-plugin/src
ENV PYTHONPATH=/app/switchyard-plugin/src