Skip to content

Vectordb replacement#386

Merged
cristibleotiu merged 5 commits intodevelopfrom
vectordb-replacement
Apr 8, 2026
Merged

Vectordb replacement#386
cristibleotiu merged 5 commits intodevelopfrom
vectordb-replacement

Conversation

@toderian
Copy link
Copy Markdown
Contributor

@toderian toderian commented Apr 7, 2026

No description provided.

toderian and others added 5 commits April 8, 2026 15:42
What changed:
- Added extensions/utils/faiss_vectordb.py — FAISS adapter with GPU auto-detection
- Rewired base_doc_emb_serving.py to use FaissVectorDB instead of HNSWVectorDB/docarray
- Replaced vectordb with faiss-cpu>=1.7.4 in requirements files
- Removed HNSWLIB_NO_NATIVE env from Dockerfiles
- Cleaned up stale vectordb cache patterns from .gitignore

Why:
- jina-ai/vectordb is archived, unmaintained since 2023, and broken on Python 3.12+
- FAISS scored 4.70/5.00 in comparison benchmark — perfect recall, fastest search, minimal deps

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
What changed:
- Removed faiss-cpu>=1.7.4 from requirements.txt and .devcontainer/requirements.txt

Why:
- FAISS is already provided by the base Docker images (faiss-cpu in CPU, faiss-gpu in GPU)
- No need to duplicate the dependency in edge_node
What changed:
- Added FastAPI test plugin for verifying FaissVectorDB adapter
- Endpoints: status, add_docs, search, list_contexts, reset_context
- Uses hash-based deterministic embeddings for testing

Why:
- Validates the FAISS replacement end-to-end on a live edge node
- All 9 tests passed against dvi-1 via ngrok HTTP tunnel
What changed:
- All Dockerfiles now use ratio1/base_edge_node_amd64_cpu:latest (Python 3.13, PyTorch 2.9.1)
- Base image is parameterized via BASE_IMAGE build arg for CPU/GPU flexibility
- Cleaned up IPFS install (parameterized Kubo version, single layer, cleanup)
- Removed old apt workarounds (base image already provides wget, tar, ca-certificates)
- Added .github/workflows/build_gpu.yml for GPU image builds

Why:
- Old base image (Python 3.10, PyTorch 2.3.1) is outdated
- GPU builds reuse same Dockerfiles with --build-arg BASE_IMAGE=ratio1/base_edge_node_amd64_gpu:latest
- GPU images pushed to ratio1/edge_node_gpu:{devnet,testnet,mainnet}
@toderian toderian force-pushed the vectordb-replacement branch from 3093753 to f2b15a0 Compare April 8, 2026 12:43
@cristibleotiu cristibleotiu merged commit 144656b into develop Apr 8, 2026
@cristibleotiu cristibleotiu deleted the vectordb-replacement branch April 8, 2026 13:06
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.

2 participants