Skip to content

fix(examples): use pgvector image and fix arm64 startup failures#10

Draft
deangoodmanson wants to merge 1 commit intodevelopfrom
fix/pgvector-examples2
Draft

fix(examples): use pgvector image and fix arm64 startup failures#10
deangoodmanson wants to merge 1 commit intodevelopfrom
fix/pgvector-examples2

Conversation

@deangoodmanson
Copy link
Copy Markdown
Collaborator

@deangoodmanson deangoodmanson commented Mar 8, 2026

Summary

  • Adds image: pgvector/pgvector:pg17 to the examples postgres service so the vector extension is available on first startup
  • Removes ivfflat index on document_chunks.embeddingvector(3072) (OpenAI text-embedding-3-large) exceeds pgvector's 2000-dimension limit for IVFFlat/HNSW indexes; sequential scan is sufficient for demo datasets
  • Removes platform: linux/amd64 from py-std-worker — it was harmful (see Known Gap below)

Problem

On arm64 (Apple Silicon), the examples stack failed on startup because the base postgres image does not include the vector extension required by the RAG examples (06b, 06c).

Known Gap: kruxia/kruxiaflow-py-std is not a multi-arch image

kruxia/kruxiaflow-py-std:latest currently only publishes a linux/arm64 manifest — there is no linux/amd64 variant. The previous platform: linux/amd64 override was added to suppress an emulation warning on Apple Silicon, but it was actively wrong: it forced amd64 emulation on the one platform where a native image already exists, and would fail or emulate on amd64 hosts.

The correct fix is to rebuild and publish the image as a proper multi-arch manifest:

docker buildx build \
  --platform linux/amd64,linux/arm64 \
  --tag kruxia/kruxiaflow-py-std:latest \
  --push \
  py/

This requires the py/Dockerfile to exist in this repo (planned per python-sdk-architecture.md as part of the first-party worker image family). Until the multi-arch image is published:

  • arm64 (Apple Silicon): works natively ✅
  • amd64 (Linux x86_64, Intel Mac): Docker will pull the arm64 image and run it under emulation ⚠️

Tracking issue needed: build and publish kruxia/kruxiaflow-py-std as linux/amd64,linux/arm64.

Test plan

  • docker-compose -f docker-compose.yml -f docker-compose.examples.yml up starts cleanly on arm64
  • vector extension available in kruxiaflow_examples database
  • Example 06b (RAG Index Builder) and 06c (RAG Query) run successfully

🤖 Generated with Claude Code

- Use pgvector/pgvector:pg17 image so the vector extension is available
- Add platform: linux/amd64 for py-std-worker to suppress emulation warning
- Remove ivfflat index on document_chunks (vector(3072) exceeds 2000-dim limit)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant