From 76f4aa80e3495254f4ae25b8bbb52810e2c15510 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 29 Jul 2024 19:40:12 -0700 Subject: [PATCH] docs(deploy.md): support running litellm docker container without internet connection --- docs/my-website/docs/proxy/deploy.md | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/my-website/docs/proxy/deploy.md b/docs/my-website/docs/proxy/deploy.md index e8bc432b8c..35fc0a5086 100644 --- a/docs/my-website/docs/proxy/deploy.md +++ b/docs/my-website/docs/proxy/deploy.md @@ -558,6 +558,39 @@ docker run --name litellm-proxy \ ghcr.io/berriai/litellm-database:main-latest --config your_config.yaml ``` +## LiteLLM without Internet Connection + +By default `prisma generate` downloads [prisma's engine binaries](https://www.prisma.io/docs/orm/reference/environment-variables-reference#custom-engine-file-locations). This might cause errors when running without internet connection. + +Use this dockerfile to build an image which pre-generates the prisma binaries. + +```Dockerfile +# Use the provided base image +FROM ghcr.io/berriai/litellm:main-latest + +# Set the working directory to /app +WORKDIR /app + +### [👇 KEY STEP] ### +# Install Prisma CLI and generate Prisma client +RUN pip install prisma +RUN prisma generate +### FIN #### + + +# Expose the necessary port +EXPOSE 4000 + +# Override the CMD instruction with your desired command and arguments +# WARNING: FOR PROD DO NOT USE `--detailed_debug` it slows down response times, instead use the following CMD +# CMD ["--port", "4000", "--config", "config.yaml"] + +# Define the command to run your app +ENTRYPOINT ["litellm"] + +CMD ["--port", "4000"] +``` + ## Advanced Deployment Settings ### 1. Customization of the server root path (custom Proxy base url)