diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cc367c4..5b1b385 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,7 @@ on: - v* jobs: - push_to_registry: + push_openwebui: name: Push Docker image to Docker Hub runs-on: ubuntu-latest steps: @@ -39,8 +39,46 @@ jobs: uses: docker/build-push-action@v5.1.0 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/metadata-action@v5.5.1 + with: + images: cmidair/doc-bot-litellm + + - name: Build and push Docker image + uses: docker/build-push-action@v5.1.0 + with: + platforms: linux/amd64,linux/arm64 + context: litellm + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + diff --git a/.gitignore b/.gitignore index 174d297..e1f6457 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.env .venv .pytst_cache local \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..91fd00b --- /dev/null +++ b/docker-compose.yaml @@ -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 + + \ No newline at end of file diff --git a/litellm/Dockerfile b/litellm/Dockerfile new file mode 100644 index 0000000..32161fa --- /dev/null +++ b/litellm/Dockerfile @@ -0,0 +1,3 @@ +FROM ghcr.io/berriai/litellm:main-latest + +COPY config.yaml /app/config.yaml \ No newline at end of file diff --git a/litellm/config.yaml b/litellm/config.yaml new file mode 100644 index 0000000..8eadf9a --- /dev/null +++ b/litellm/config.yaml @@ -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 \ No newline at end of file diff --git a/.python-version b/open_webui/.python-version similarity index 100% rename from .python-version rename to open_webui/.python-version diff --git a/Dockerfile b/open_webui/Dockerfile similarity index 100% rename from Dockerfile rename to open_webui/Dockerfile diff --git a/functions/pipe_anthropic_bedrock.py b/open_webui/functions/pipe_anthropic_bedrock.py similarity index 100% rename from functions/pipe_anthropic_bedrock.py rename to open_webui/functions/pipe_anthropic_bedrock.py diff --git a/pyproject.toml b/open_webui/pyproject.toml similarity index 100% rename from pyproject.toml rename to open_webui/pyproject.toml diff --git a/uv.lock b/open_webui/uv.lock similarity index 100% rename from uv.lock rename to open_webui/uv.lock