-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b8bde73
Add .idea/ directory to .gitignore to exclude IDE settings from versi…
coconut49 5ab1312
Add '*.pyc' to .gitignore to ignore Python compiled files
coconut49 5c1a460
rm litellm/__pycache__/
coconut49 2039066
Remove all __pycache__ directories
coconut49 e8a5681
Refactor start script and Dockerfile, switch to bash entrypoint
coconut49 0d24bca
Expose port 8000 in Dockerfile and add deployment instructions.
coconut49 d4f7fb7
Add backoff and boto3 to requirements.txt
coconut49 266b3b8
Set WORKDIR to /app before installing requirements in Dockerfile.
coconut49 4414594
Refactor proxy_server.py for readability and code consistency
coconut49 762e4c8
Change boolean values in secrets_template.toml from title to lower case.
coconut49 0939302
Refactor proxy_server.py to simplify v1 endpoints and improve logging
coconut49 07f06c6
Refactor Dockerfile and proxy_cli.py to use new secrets file location
coconut49 bb91a86
Change Dockerfile to rename secrets_template.toml to litellm.secrets.…
coconut49 cd5bb4a
Add uvicorn, fastapi, tomli, and tomli-w to requirements.txt
coconut49 db55dac
merge
coconut49 356a104
Add new routes for v1 versioning in proxy server
coconut49 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
import operator | ||
|
||
config_filename = "litellm.secrets.toml" | ||
pkg_config_filename = "template.secrets.toml" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.