Update docker example & relevant docs
This commit is contained in:
parent
a31fcad6b0
commit
d197fb5a35
5 changed files with 78 additions and 18 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -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/)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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/
|
||||
|
|
|
|||
Loading…
Reference in a new issue