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.

Add new version of the default Docker compose file. (#677)

Daniel Pettibb154c00a5d1
diff --git a/.gitignore b/.gitignore
index 4dc5042d24..6fcbffc655 100644
--- a/.gitignore
+++ b/.gitignore
@@ -219,7 +219,6 @@ screenshots/
# Ignore cookiecutter-generated files.
docker-compose.*.yml
-scripts/*.sh
backup/
# Security - ignore generated secret keys
diff --git a/cookiecutter-docker/{{cookiecutter.config_name}}/docker-compose.{{cookiecutter.config_name}}.yml b/cookiecutter-docker/{{cookiecutter.config_name}}/docker-compose.{{cookiecutter.config_name}}.yml
index 356f61c5dd..881bb79eb7 100644
--- a/cookiecutter-docker/{{cookiecutter.config_name}}/docker-compose.{{cookiecutter.config_name}}.yml
+++ b/cookiecutter-docker/{{cookiecutter.config_name}}/docker-compose.{{cookiecutter.config_name}}.yml
@@ -62,6 +62,8 @@ services:
timeout: 5s
start_period: 10m
retries: 2
+ environment:
+ OLLAMA_KEEP_ALIVE: '30m'
volumes:
- ollama_data:/root/.ollama
- ./scripts/:/scripts/
diff --git a/docker-compose.yml b/docker-compose.yml
index c52f9479c1..9fc9b3159c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,52 +1,80 @@
-name: 'local-ai'
-
services:
+ local-deep-research:
+ image: localdeepresearch/local-deep-research
+
+ networks:
+ - ldr-network
+
+ ports:
+ - "5000:5000"
+ environment:
+ # Web Interface Settings
+ - LDR_WEB_PORT=5000
+ - LDR_WEB_HOST=0.0.0.0
+ - LDR_LLM_PROVIDER=ollama
+ - LDR_LLM_OLLAMA_URL=http://ollama:11434
+
+ - LDR_SEARCH_ENGINE_WEB_SEARXNG_DEFAULT_PARAMS_INSTANCE_URL=http://searxng:8080
+
+ # Data directory configuration
+ - LDR_DATA_DIR=/data
+ volumes:
+ - ldr_data:/data
+ - ./local_collections/personal_notes:/local_collections/personal_notes/
+ - ./local_collections/project_docs:/local_collections/project_docs/
+ - ./local_collections/research_papers:/local_collections/research_papers/
+ restart: unless-stopped
+ depends_on:
+ ollama:
+ condition: service_healthy
+
+ searxng:
+ condition: service_started
+
ollama:
- image: 'ollama/ollama:latest'
- deploy:
+ image: ollama/ollama:latest
+ deploy: # Remove this section if you do not have an Nvidia GPU.
resources:
reservations:
devices:
- driver: nvidia
count: 1
- capabilities: [gpu]
+ capabilities: [ gpu ]
+
+ container_name: ollama_service
+ entrypoint: [ "/scripts/ollama_entrypoint.sh" ]
+ healthcheck:
+ test: [ "CMD", "ollama", "show", "gemma3:12b" ]
+ interval: 10s
+ timeout: 5s
+ start_period: 10m
+ retries: 2
environment:
OLLAMA_KEEP_ALIVE: '30m'
volumes:
- - type: 'volume'
- source: 'ollama'
- target: '/root/.ollama'
+ - ollama_data:/root/.ollama
+ - ./scripts/:/scripts/
+ networks:
+ - ldr-network
+
+
+ restart: unless-stopped
searxng:
- image: 'ghcr.io/searxng/searxng:latest'
+ image: searxng/searxng:latest
+ container_name: searxng
+ networks:
+ - ldr-network
- deep-research:
- image: 'localdeepresearch/local-deep-research:latest'
- ports:
- - target: '5000' # port bound by app inside container
- published: '5000' # port bound on the docker host
- protocol: 'tcp'
- environment:
- LDR_LLM_PROVIDER: 'ollama'
- LDR_LLM_OLLAMA_URL: 'http://ollama:11434'
- # change model depending on preference and available VRAM
- LDR_LLM_MODEL: 'gemma3:12b'
- LDR_SEARCH_ENGINE_WEB_SEARXNG_DEFAULT_PARAMS_INSTANCE_URL: 'http://searxng:8080'
- LDR_DATA_DIR: '/data'
volumes:
- # NOTE: These volume paths may not work with current changes:
- # 1. Data directory structure has changed - we now use /data as LDR_DATA_DIR
- # 2. Research outputs are only created when explicitly requested by user
- # TODO: Update these paths to match new directory structure
- - type: 'volume'
- source: 'deep-research'
- target: '/install/.venv/lib/python3.13/site-packages/data/'
- - type: 'volume'
- source: 'deep-research-outputs'
- target: '/install/.venv/lib/python3.13/research_outputs'
+ - searxng_data:/etc/searxng
+ restart: unless-stopped
+
volumes:
- ollama:
- deep-research:
- deep-research-outputs:
+ ldr_data:
+ ollama_data:
+ searxng_data:
+networks:
+ ldr-network:
diff --git a/scripts/ollama_entrypoint.sh b/scripts/ollama_entrypoint.sh
new file mode 100755
index 0000000000..631d945ec9
--- /dev/null
+++ b/scripts/ollama_entrypoint.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+set -e
+
+# Start the main Ollama application
+ollama serve &
+
+# Wait for the Ollama application to be ready (optional, if necessary)
+while ! ollama ls; do
+ echo "Waiting for Ollama service to be ready..."
+ sleep 10
+done
+echo "Ollama service is ready."
+
+# Pull the model using ollama pull
+echo "Pulling the gemma3:12b with ollama pull..."
+ollama pull gemma3:12b
+# Check if the model was pulled successfully
+if [ $? -eq 0 ]; then
+ echo "Model pulled successfully."
+else
+ echo "Failed to pull model."
+ exit 1
+fi
+
+# Run ollama forever.
+sleep infinity