diff --git a/docs/installation.md b/docs/installation.md index 7e8f4a4d..a6b2acb3 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -75,14 +75,23 @@ See [Remote processing](remote-processing.md) for setup instructions and [Docume ## Docker +Two Docker images are available: + +### Full Image (Self-contained) + +Includes all features and document processing built-in: + ```bash docker pull ghcr.io/ggozad/haiku.rag:latest +docker run -p 8001:8001 -v $(pwd)/data:/data ghcr.io/ggozad/haiku.rag:latest ``` -Run the container with all services: +### Slim Image (Minimal) + +Minimal dependencies - use with external docling-serve for document processing: ```bash -docker run -p 8000:8000 -p 8001:8001 -v $(pwd)/data:/data ghcr.io/ggozad/haiku.rag:latest +docker pull ghcr.io/ggozad/haiku.rag-slim:latest ``` -This starts the MCP server on port 8001, with data persisted to `./data`. +See `examples/docker/docker-compose.yml` for a complete setup with docling-serve. diff --git a/docs/remote-processing.md b/docs/remote-processing.md index 42d6be71..c8d44480 100644 --- a/docs/remote-processing.md +++ b/docs/remote-processing.md @@ -30,7 +30,11 @@ docling-serve is a REST API service that provides: ## Setup -### Running docling-serve +### Docker Compose (Recommended) + +The easiest way to use haiku.rag with docling-serve is using the slim Docker image with docker-compose. See `examples/docker/docker-compose.yml` for a complete setup that includes both services. + +### Running docling-serve Manually See the [official docling-serve repository](https://github.com/docling-project/docling-serve) for installation options. The quickest way is using Docker: diff --git a/examples/docker/README.md b/examples/docker/README.md index dc1ddef8..0f31b0f2 100644 --- a/examples/docker/README.md +++ b/examples/docker/README.md @@ -1,6 +1,15 @@ # haiku.rag Docker Compose Example -Run haiku.rag with file monitoring and MCP server. +Run haiku.rag with docling-serve for remote document processing, file monitoring, and MCP server. + +## Architecture + +This example demonstrates remote processing with two services: + +- **docling-serve** - Document conversion and chunking service +- **haiku-rag** - MCP server and file monitoring (using slim image) + +This setup showcases the minimal haiku.rag-slim image combined with external document processing, ideal for production deployments. ## Quick Start @@ -27,13 +36,24 @@ docker compose exec haiku-rag haiku-rag ask "What is haiku.rag?" ## Ports +- `5001` - docling-serve API (with UI enabled) - `8001` - MCP server ## Configuration -Edit `haiku.rag.yaml` to configure providers, embeddings, and other settings. See the [Configuration documentation](https://ggozad.github.io/haiku.rag/configuration/) for all options. +The setup uses `haiku.rag-slim` image configured to use docling-serve for document processing: -Default setup uses Ollama on the host (`host.docker.internal:11434`). +```yaml +processing: + converter: docling-serve + chunker: docling-serve + +providers: + docling_serve: + base_url: http://docling-serve:5001 +``` + +Edit `haiku.rag.yaml` to configure providers, embeddings, and other settings. See the [Configuration documentation](https://ggozad.github.io/haiku.rag/configuration/) for all options. For API keys (OpenAI, Anthropic, etc.), set them as environment variables: @@ -45,6 +65,7 @@ docker compose up -d ## Documentation +- [Remote Processing](https://ggozad.github.io/haiku.rag/remote-processing/) - [Configuration](https://ggozad.github.io/haiku.rag/configuration/) - [CLI Commands](https://ggozad.github.io/haiku.rag/cli/) - [MCP Server](https://ggozad.github.io/haiku.rag/mcp/) diff --git a/examples/docker/docker-compose.yml b/examples/docker/docker-compose.yml index 666fe5a6..cbcb2d1a 100644 --- a/examples/docker/docker-compose.yml +++ b/examples/docker/docker-compose.yml @@ -1,8 +1,24 @@ services: + docling-serve: + image: quay.io/docling-project/docling-serve:latest + container_name: docling-serve + ports: + - "5001:5001" + environment: + - DOCLING_SERVE_ENABLE_UI=1 + restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:5001/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + start_interval: 5s + haiku-rag: build: context: ../.. - dockerfile: docker/Dockerfile + dockerfile: docker/Dockerfile.slim container_name: haiku-rag ports: - "8001:8001" # MCP server @@ -16,5 +32,7 @@ services: - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - VOYAGE_API_KEY=${VOYAGE_API_KEY} - CO_API_KEY=${CO_API_KEY} - + depends_on: + docling-serve: + condition: service_healthy restart: unless-stopped diff --git a/examples/docker/haiku.rag.yaml.example b/examples/docker/haiku.rag.yaml.example index 551b3313..616e3ada 100644 --- a/examples/docker/haiku.rag.yaml.example +++ b/examples/docker/haiku.rag.yaml.example @@ -5,21 +5,29 @@ environment: production storage: data_dir: /data - monitor_directories: + +monitor: + directories: - /docs -embeddings: - provider: ollama - model: nomic-embed-text - vector_dim: 768 - -qa: - provider: ollama - model: qwen3 +# Remote document processing with docling-serve +processing: + converter: docling-serve + chunker: docling-serve + chunk_size: 256 + chunker_type: hybrid + chunking_tokenizer: "Qwen/Qwen3-Embedding-0.6B" + chunking_merge_peers: true + chunking_use_markdown_tables: false providers: + docling_serve: + base_url: http://docling-serve:5001 + api_key: "" + timeout: 300 ollama: base_url: http://host.docker.internal:11434 + # For other providers (OpenAI, Anthropic, VoyageAI, etc.), # see: https://ggozad.github.io/haiku.rag/configuration/