Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

added docker-compose.yml

LearningCircuitad3dbd39d386
diff --git a/Dockerfile b/Dockerfile
index 91126f9593..f82bb782f0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -20,7 +20,7 @@ ENV LDR_SEARCH__ITERATIONS=2
ENV LDR_SEARCH__QUESTIONS_PER_ITERATION=2
ENV LDR_GENERAL__ENABLE_FACT_CHECKING=false
ENV LDR_LLM__PROVIDER="ollama"
-ENV LDR_LLM__MODEL="gemma3:12b"
+ENV LDR_LLM__MODEL="mistral"
ENV LDR_LLM__TEMPERATURE=0.7
ENV LDR_LLM__MAX_TOKENS=30000
ENV OLLAMA_BASE_URL="http://localhost:11434"
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000000..8916acf1a9
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,41 @@
+version: '3'
+
+services:
+ local-deep-research:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ network_mode: host # Best option for connecting to locally running Ollama
+ environment:
+ # LLM Configuration
+ - LDR_LLM__PROVIDER=ollama
+ - LDR_LLM__MODEL=mistral
+ - LDR_LLM__TEMPERATURE=0.7
+
+ # Search Configuration
+ - LDR_SEARCH__TOOL=auto
+ - LDR_SEARCH__ITERATIONS=2
+ - LDR_SEARCH__QUESTIONS_PER_ITERATION=2
+
+ # Web Interface Settings
+ - LDR_WEB__PORT=5000
+ - LDR_WEB__HOST=0.0.0.0
+ volumes:
+ - ./data:/root/.config/local_deep_research
+ restart: unless-stopped
+
+ # Uncomment to run Ollama in Docker as well (requires more system resources)
+ # ollama:
+ # image: ollama/ollama:latest
+ # volumes:
+ # - ./ollama-data:/root/.ollama
+ # ports:
+ # - "11434:11434"
+ # deploy:
+ # resources:
+ # reservations:
+ # devices:
+ # - driver: nvidia
+ # count: all
+ # capabilities: [gpu]
+ # restart: unless-stopped
\ No newline at end of file
diff --git a/docs/docker-compose-guide.md b/docs/docker-compose-guide.md
new file mode 100644
index 0000000000..8a2c6fadd3
--- /dev/null
+++ b/docs/docker-compose-guide.md
@@ -0,0 +1,231 @@
+# Docker Compose Setup for Local Deep Research
+
+This guide covers how to use Docker Compose to run Local Deep Research, making it easier to manage containers, configuration, and persistent storage.
+
+## Prerequisites
+
+- Docker and Docker Compose installed on your system
+- Ollama installed (for local model support) or API keys for cloud providers
+
+## Basic Docker Compose Setup
+
+Create a file named `docker-compose.yml` in your project directory:
+
+```yaml
+version: '3'
+
+services:
+ local-deep-research:
+ image: local-deep-research:latest
+ network_mode: host # For connecting to Ollama on the host
+ environment:
+ - LDR_LLM__PROVIDER=ollama
+ - LDR_LLM__MODEL=mistral
+ - LDR_SEARCH__TOOL=auto
+ - LDR_SEARCH__ITERATIONS=2
+ volumes:
+ - ./ldr-data:/root/.config/local_deep_research
+ restart: unless-stopped
+```
+
+## Running the Docker Compose Setup
+
+```bash
+# Build the image first if you haven't already
+docker build -t local-deep-research .
+
+# Start the services
+docker-compose up -d
+
+# View logs
+docker-compose logs -f
+
+# Stop the services
+docker-compose down
+```
+
+## Advanced Docker Compose Configuration
+
+### Using Cloud LLM Providers
+
+Here's an example using OpenAI instead of Ollama:
+
+```yaml
+version: '3'
+
+services:
+ local-deep-research:
+ image: local-deep-research:latest
+ ports:
+ - "5000:5000" # No need for host networking with cloud APIs
+ environment:
+ - LDR_LLM__PROVIDER=openai
+ - LDR_LLM__MODEL=gpt-4o
+ - OPENAI_API_KEY=${OPENAI_API_KEY} # Set this in .env file or export it
+ - LDR_SEARCH__TOOL=auto
+ - LDR_SEARCH__ITERATIONS=2
+ volumes:
+ - ./ldr-data:/root/.config/local_deep_research
+ restart: unless-stopped
+```
+
+### Using Multiple Search Engines
+
+```yaml
+version: '3'
+
+services:
+ local-deep-research:
+ image: local-deep-research:latest
+ network_mode: host
+ environment:
+ - LDR_LLM__PROVIDER=ollama
+ - LDR_LLM__MODEL=mistral
+ - LDR_SEARCH__TOOL=wikipedia # Specify a single search engine
+ - LDR_SEARCH__MAX_RESULTS=20
+ - LDR_SEARCH__ITERATIONS=3
+ volumes:
+ - ./ldr-data:/root/.config/local_deep_research
+ restart: unless-stopped
+```
+
+### Full Production Setup
+
+A complete example with environment variables in a separate file:
+
+1. Create a `.env` file:
+```
+# LLM Configuration
+LDR_LLM__PROVIDER=ollama
+LDR_LLM__MODEL=mistral
+LDR_LLM__TEMPERATURE=0.7
+
+# Search Configuration
+LDR_SEARCH__TOOL=auto
+LDR_SEARCH__ITERATIONS=3
+LDR_SEARCH__QUESTIONS_PER_ITERATION=2
+
+# Web Server Settings
+LDR_WEB__PORT=5000
+```
+
+2. Create your `docker-compose.yml`:
+```yaml
+version: '3'
+
+services:
+ local-deep-research:
+ image: local-deep-research:latest
+ network_mode: host
+ env_file:
+ - .env
+ volumes:
+ - ./ldr-data:/root/.config/local_deep_research
+ restart: unless-stopped
+```
+
+## Advanced Use Cases
+
+### Running with a Custom Dockerfile
+
+If you've made modifications to the Dockerfile:
+
+```yaml
+version: '3'
+
+services:
+ local-deep-research:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ network_mode: host
+ environment:
+ - LDR_LLM__PROVIDER=ollama
+ - LDR_LLM__MODEL=mistral
+ volumes:
+ - ./ldr-data:/root/.config/local_deep_research
+ restart: unless-stopped
+```
+
+### Running with Health Checks
+
+```yaml
+version: '3'
+
+services:
+ local-deep-research:
+ image: local-deep-research:latest
+ network_mode: host
+ environment:
+ - LDR_LLM__PROVIDER=ollama
+ - LDR_LLM__MODEL=mistral
+ volumes:
+ - ./ldr-data:/root/.config/local_deep_research
+ healthcheck:
+ test: ["CMD", "curl", "-f", "http://localhost:5000"]
+ interval: 1m
+ timeout: 10s
+ retries: 3
+ restart: unless-stopped
+```
+
+### Combined Setup with Ollama
+
+If you want to run both Ollama and Local Deep Research in Docker:
+
+```yaml
+version: '3'
+
+services:
+ ollama:
+ image: ollama/ollama:latest
+ volumes:
+ - ./ollama-data:/root/.ollama
+ ports:
+ - "11434:11434"
+ restart: unless-stopped
+
+ local-deep-research:
+ image: local-deep-research:latest
+ depends_on:
+ - ollama
+ environment:
+ - LDR_LLM__PROVIDER=ollama
+ - LDR_LLM__MODEL=mistral
+ - OLLAMA_BASE_URL=http://ollama:11434
+ ports:
+ - "5000:5000"
+ volumes:
+ - ./ldr-data:/root/.config/local_deep_research
+ restart: unless-stopped
+```
+
+Note that with this setup, you'd need to pull any models you need inside the Ollama container:
+
+```bash
+docker exec -it <ollama-container-id> ollama pull mistral
+```
+
+## Troubleshooting
+
+### Environment Variables Not Working
+
+If environment variables don't seem to be taking effect:
+
+1. Make sure you're using the correct format (`LDR_SECTION__SETTING`)
+2. Verify they're being passed to the container with `docker-compose config`
+3. Try restarting the container with `docker-compose restart`
+
+### Container Can't Connect to Ollama
+
+When using the combined setup and getting connection errors:
+
+1. Check if ollama container is running:
+ ```bash
+ docker-compose ps
+ ```
+2. Test connectivity from within the container:
+ ```bash
+ docker exec -it <container-id> curl -v http://ollama:11434/api/tags
+ ```
+3. Ensure your chosen model is pulled in the Ollama container.