Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

[Fix] Docker: restore pre-uv Prisma cache path for /app/.cache mounts

Yuneng Jiang731c549876ac
diff --git a/Dockerfile b/Dockerfile
index a2cd1cb3ed2..0deddce3490 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -94,15 +94,21 @@ RUN apk add --no-cache bash openssl tzdata nodejs npm python3 libsndfile supervi
{ apk del --no-cache npm 2>/dev/null || true; }
WORKDIR /app
-ENV PRISMA_BINARY_CACHE_DIR=/app/.cache/prisma-python/binaries \
- XDG_CACHE_HOME=/app/.cache \
- PATH="/app/.venv/bin:${PATH}"
+ENV PATH="/app/.venv/bin:${PATH}"
COPY --from=builder /app /app
RUN find /app/.venv -type f -path "*/tornado/test/*" -delete && \
find /app/.venv -type d -path "*/tornado/test" -delete
+# Regenerate the Prisma client in the runtime stage so the baked-in
+# BINARY_PATHS resolve to a location outside /app. Users with volume mounts
+# that shadow /app/.cache (e.g. readOnlyRootFilesystem + emptyDir) would
+# otherwise lose access to the pre-downloaded query engine at runtime.
+# Drop the builder's /app/.cache afterwards — it's stale and adds ~800 MB
+# the runtime doesn't use.
+RUN rm -rf /app/.cache && prisma generate --schema=./schema.prisma
+
EXPOSE 4000/tcp
COPY docker/supervisord.conf /etc/supervisord.conf
diff --git a/docker/Dockerfile.database b/docker/Dockerfile.database
index 57ecef81eb8..1eebc26731d 100644
--- a/docker/Dockerfile.database
+++ b/docker/Dockerfile.database
@@ -92,15 +92,21 @@ RUN apk add --no-cache bash openssl tzdata nodejs npm python3 libsndfile supervi
{ apk del --no-cache npm 2>/dev/null || true; }
WORKDIR /app
-ENV PRISMA_BINARY_CACHE_DIR=/app/.cache/prisma-python/binaries \
- XDG_CACHE_HOME=/app/.cache \
- PATH="/app/.venv/bin:${PATH}"
+ENV PATH="/app/.venv/bin:${PATH}"
COPY --from=builder /app /app
RUN find /app/.venv -type f -path "*/tornado/test/*" -delete && \
find /app/.venv -type d -path "*/tornado/test" -delete
+# Regenerate the Prisma client in the runtime stage so the baked-in
+# BINARY_PATHS resolve to a location outside /app. Users with volume mounts
+# that shadow /app/.cache (e.g. readOnlyRootFilesystem + emptyDir) would
+# otherwise lose access to the pre-downloaded query engine at runtime.
+# Drop the builder's /app/.cache afterwards — it's stale and adds ~800 MB
+# the runtime doesn't use.
+RUN rm -rf /app/.cache && prisma generate --schema=./schema.prisma
+
EXPOSE 4000/tcp
COPY docker/supervisord.conf /etc/supervisord.conf