33 lines
833 B
Docker
33 lines
833 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 companion/ ./companion/
|
|
COPY companion/indexer_daemon/ ./companion/indexer_daemon/
|
|
COPY 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"]
|