Files
kv-ai/Dockerfile.indexer
Santhosh Janardhanan f000f13672 fix: Docker paths, chunker word→char split, and ChatOrchestrator args
Fixed multiple issues preventing the indexer from running:
- Docker COPY paths: companion/ → src/companion/ to match project structure
- pyproject.toml: [tool.hatchling] → [tool.hatch.build.targets.wheel]
- api.py: ChatOrchestrator init params (session_memory instead of http_client)
- chunker.py: Fixed character-based chunking (was word-based, causing 400 errors from Ollama embedding API due to exceeding token limits)
- config.json: Use exact model tag mxbai-embed-large:335m
- docker-compose.yml: Fixed vault mount path
2026-04-13 16:45:50 -04:00

33 lines
845 B
Docker

# Indexer-only Dockerfile (lightweight, no API dependencies)
FROM python:3.11-slim
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir \
pydantic lancedb pyarrow requests watchdog typer rich numpy httpx
# Copy application code
COPY src/companion/ ./companion/
COPY src/companion/indexer_daemon/ ./companion/indexer_daemon/
COPY src/companion/rag/ ./companion/rag/
# Create directories for data
RUN mkdir -p /data/vectors
# Copy default config
COPY config.json /app/config.json
# Environment variables
ENV PYTHONPATH=/app
ENV COMPANION_CONFIG=/app/config.json
ENV COMPANION_DATA_DIR=/data
# Default command (can be overridden)
CMD ["python", "-m", "companion.indexer_daemon.cli", "index"]