From f7ad15c3921903f0a05d0840a6da870350e9dadc Mon Sep 17 00:00:00 2001 From: David Manouchehri Date: Thu, 23 Nov 2023 04:18:53 -0500 Subject: [PATCH 1/2] Reduce Docker size by not copying unneeded files. --- Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 351411cbbc..f58a539e3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,19 @@ # Base image FROM python:3.9-slim -# Set the working directory -WORKDIR /app - # Copy the project files to the working directory -COPY . /app +COPY litellm /app/litellm + +# Set the working directory +WORKDIR /app/litellm # Install the project dependencies +COPY requirements.txt /app/litellm/requirements.txt RUN pip install -r requirements.txt WORKDIR /app/litellm/proxy +COPY hosted_config.yaml /app/hosted_config.yaml + # Set the command to run when the container starts CMD python3 proxy_cli.py --config /app/hosted_config.yaml --port 4000 \ No newline at end of file From c7e3c399c2be21dfb5917b8137078476f0e1334e Mon Sep 17 00:00:00 2001 From: David Manouchehri Date: Thu, 23 Nov 2023 04:19:54 -0500 Subject: [PATCH 2/2] Add default expose. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index f58a539e3f..4712a8bea4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,5 +15,7 @@ WORKDIR /app/litellm/proxy COPY hosted_config.yaml /app/hosted_config.yaml +EXPOSE 4000/tcp + # Set the command to run when the container starts CMD python3 proxy_cli.py --config /app/hosted_config.yaml --port 4000 \ No newline at end of file