From 07f06c6479dd5748627b7cbf1983226fb5e3f21d Mon Sep 17 00:00:00 2001 From: coconut49 Date: Wed, 18 Oct 2023 01:17:03 +0800 Subject: [PATCH] Refactor Dockerfile and proxy_cli.py to use new secrets file location --- Dockerfile | 6 +++--- litellm/proxy/proxy_cli.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 93cf54d3f..f32db7243 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ FROM python:3.10 COPY . /app - WORKDIR /app +RUN mkdir -p /root/.config/litellm/ && cp /app/secrets_template.toml /root/.config/litellm/secrets_template.toml RUN pip install -r requirements.txt WORKDIR /app/litellm/proxy EXPOSE 8000 -ENTRYPOINT [ "/bin/bash", "/app/litellm/proxy/start.sh" ] +ENTRYPOINT [ "python3", "proxy_cli.py" ] # TODO - Set up a GitHub Action to automatically create the Docker image, # and then we can quickly deploy the litellm proxy in the following way -# `docker run -p 8000:8000 ghcr.io/BerriAI/litellm:v0.8.4 -v ./secrets_template.toml:/app/secrets_template.toml` \ No newline at end of file +# `docker run -p 8000:8000 ghcr.io/BerriAI/litellm:v0.8.4 -v ./secrets_template.toml:/root/.config/litellm/secrets_template.toml` \ No newline at end of file diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index bd8ef8cc7..6c0afa695 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -7,7 +7,6 @@ from dotenv import load_dotenv import operator config_filename = "litellm.secrets.toml" -pkg_config_filename = "template.secrets.toml" # Using appdirs to determine user-specific config path config_dir = appdirs.user_config_dir("litellm") user_config_path = os.path.join(config_dir, config_filename)