Skip to content

Commit

Permalink
feat: add litellm
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinderVosDeWael committed Nov 1, 2024
1 parent af8766b commit db47edd
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 2 deletions.
42 changes: 40 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- v*

jobs:
push_to_registry:
push_openwebui:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -39,8 +39,46 @@ jobs:
uses: docker/[email protected]
with:
platforms: linux/amd64,linux/arm64
context: .
context: open_webui
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

push_litellm:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
lfs: true

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: cmidair/doc-bot-litellm

- name: Build and push Docker image
uses: docker/[email protected]
with:
platforms: linux/amd64,linux/arm64
context: litellm
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
.venv
.pytst_cache
local
23 changes: 23 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
services:
litellm:
build:
context: litellm
dockerfile: Dockerfile
ports:
- 4000:4000
env_file:
- .env
volumes:
- ./litellm/config.yaml:/app/config.yaml
command: --config /app/config.yaml --detailed_debug

open_webui:
build:
context: open_webui
dockerfile: Dockerfile
ports:
- 3000:8080
env_file:
- .env


3 changes: 3 additions & 0 deletions litellm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ghcr.io/berriai/litellm:main-latest

COPY config.yaml /app/config.yaml
10 changes: 10 additions & 0 deletions litellm/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
model_list:
- model_name: cohere-embed-english-v3
litellm_params:
model: bedrock/cohere.embed-english-v3
aws_access_key_id: os.environ/AWS_ACCESS_KEY
aws_secret_access_key: os.environ/AWS_SECRET_ACCESS_KEY
aws_region_name: os.environ/AWS_REGION_NAME

general_settings:
master_key: os.environ/LITELLM_KEY
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit db47edd

Please sign in to comment.