Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Dockerfile of the LiteLLM Proxy server and some refactorings #628

Merged
merged 16 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.env
litellm_uuid.txt
__pycache__/
*.pyc
bun.lockb
**/.DS_Store
.aider*
Expand All @@ -10,3 +11,4 @@ secrets.toml
.gitignore
litellm/proxy/litellm_secrets.toml
litellm/proxy/api_log.json
.idea/
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
FROM python:3.10

RUN pip install poetry

WORKDIR /app

COPY . .

COPY . /app
WORKDIR /app
RUN mkdir -p /root/.config/litellm/ && cp /app/secrets_template.toml /root/.config/litellm/litellm.secrets.toml
RUN pip install -r requirements.txt

WORKDIR /app/litellm/proxy

RUN python proxy_cli.py --config -f /app/secrets_template.toml

RUN python proxy_cli.py
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't RUN python proxy_cli.py as it will cause the docker build process to get blocked.

EXPOSE 8000
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 -v ./secrets_template.toml:/root/.config/litellm/litellm.secrets.toml ghcr.io/BerriAI/litellm:v0.8.4`
Binary file removed litellm/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file removed litellm/__pycache__/main.cpython-311.pyc
Binary file not shown.
Binary file removed litellm/__pycache__/timeout.cpython-311.pyc
Binary file not shown.
Binary file removed litellm/__pycache__/utils.cpython-311.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion litellm/proxy/proxy_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import operator

config_filename = "litellm.secrets.toml"
pkg_config_filename = "template.secrets.toml"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable is not being used.

# 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)
Expand Down
Loading