Skip to content

Commit

Permalink
chore(ci): fix executor image building
Browse files Browse the repository at this point in the history
  • Loading branch information
seriousben committed Dec 18, 2024
1 parent f2c6c3c commit 69785f0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/publish_executor_containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@ name: Publish Example Executor Containers

on:
workflow_dispatch:
inputs:
indexify_version:
type: string
description: |
Indexify version to use to build the executor containers.
Note: Should ideally match the tag used for this workflow.
required: true

jobs:
build-and-push-docker-images:
name: Build and Push Docker Executor
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -23,11 +32,19 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: |
curl -LsSf https://astral.sh/uv/install.sh | sh # install uv
uv pip install --system indexify -U
indexify-cli build-default-image
uv pip install --system 'indexify==${{ inputs.indexify_version }}' -U
indexify-cli build-default-image --python-version 3.10
docker push tensorlake/indexify-executor-default:3.10
indexify-cli build-default-image --python-version 3.11
docker push tensorlake/indexify-executor-default:3.11
indexify-cli build-default-image --python-version 3.12
docker push tensorlake/indexify-executor-default:3.12
indexify-cli build-default-image --python-version 3.13
docker push tensorlake/indexify-executor-default:3.13
indexify-cli build-image examples/pdf_document_extraction/images.py
indexify-cli build-image examples/pdf_structured_extraction/workflow.py
indexify-cli build-image examples/tweetsgenerator/workflow.py
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish_indexify_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: |
sleep 15
pip install indexify -U
indexify-cli build-default-image
docker push tensorlake/indexify-executor-default:3.10
docker push tensorlake/indexify-executor-default:3.11
# wait for the indexify-cli to be available
sleep 60
- uses: ./.github/workflows/publish_executor_containers.yaml
with:
indexify_version: ${{ needs.extract-version.outputs.version }}
9 changes: 6 additions & 3 deletions examples/pdf_document_extraction/images.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
from indexify import Image

http_client_image = (
Image(python="3.11")
Image()
.name("tensorlake/pdf-blueprint-download")
.base_image(f"python:3.11-slim-bookworm")
.run("pip install httpx")
)

chroma_image = (
Image(python="3.11")
Image()
.name("tensorlake/blueprints-chromadb")
.base_image(f"python:3.11-slim-bookworm")
.run("pip install chromadb")
.run("pip install pillow")
)
Expand All @@ -24,8 +26,9 @@
)

lance_image = (
Image(python="3.11")
Image()
.name("tensorlake/pdf-blueprint-lancdb")
.base_image(f"python:3.11-slim-bookworm")
.run("pip install lancedb")
)

Expand Down

0 comments on commit 69785f0

Please sign in to comment.