~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
Fix the `docker-compose` one-liner. (#711)
Daniel Pettica3812984c26
diff --git a/Dockerfile b/Dockerfileindex 93f6172c90..7f9930810f 100644--- a/Dockerfile+++ b/Dockerfile@@ -136,6 +136,12 @@ RUN playwright install# Create volume for persistent configurationVOLUME /root/.config/local_deep_research+# Create volume for Ollama start script+VOLUME /scripts/+# Copy the Ollama entrypoint script+ADD scripts/ollama_entrypoint.sh /scripts/ollama_entrypoint.sh+RUN chmod +x /scripts/ollama_entrypoint.sh+EXPOSE 5000STOPSIGNAL SIGINTdiff --git a/README.md b/README.mdindex bf1b63e3a4..39ccde18e5 100644--- a/README.md+++ b/README.md@@ -107,6 +107,13 @@ you can get up and running quickly.```bashcurl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml && docker compose up -d```++Use with a different model:++```bash+MODEL=gemma:1b curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml && docker compose up -d+```+Open http://localhost:5000 after ~30 seconds. This starts LDR with SearXNG and all dependencies.#### Option 2b: DIY docker-composediff --git a/cookiecutter-docker/hooks/post_gen_project.py b/cookiecutter-docker/hooks/post_gen_project.pyindex 069ad7eac0..1ae53867d4 100644--- a/cookiecutter-docker/hooks/post_gen_project.py+++ b/cookiecutter-docker/hooks/post_gen_project.py@@ -14,12 +14,6 @@ def main():output_dir = compose_path.parent.absolute()compose_path.rename(output_dir.parent / COMPOSE_FILE_NAME)- # Move the entrypoint script to the scripts directory.- entrypoint_path = output_dir / "ollama_entrypoint.sh"- entrypoint_path.rename(- output_dir.parent / "scripts" / "ollama_entrypoint.sh"- )-# Delete the directory.shutil.rmtree(output_dir)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}}.ymlindex 881bb79eb7..b63ce0d87f 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@@ -31,6 +31,7 @@ services:- LDR_DATA_DIR=/datavolumes:- ldr_data:/data+ - ldr_scripts:/scripts- ./local_collections/personal_notes:/local_collections/personal_notes/- ./local_collections/project_docs:/local_collections/project_docs/- ./local_collections/research_papers:/local_collections/research_papers/@@ -55,9 +56,9 @@ services:image: ollama/ollama:latest{% endif %}container_name: ollama_service- entrypoint: [ "/scripts/ollama_entrypoint.sh" ]+ entrypoint: "/scripts/ollama_entrypoint.sh ${MODEL:-gemma3:12b}"healthcheck:- test: [ "CMD", "ollama", "show", "{{ cookiecutter._ollama_model }}" ]+ test: [ "CMD", "ollama", "show", "${MODEL:-{{ cookiecutter._ollama_model }}}" ]interval: 10stimeout: 5sstart_period: 10m@@ -66,6 +67,7 @@ services:OLLAMA_KEEP_ALIVE: '30m'volumes:- ollama_data:/root/.ollama+ - ldr_scripts:/scripts- ./scripts/:/scripts/{%- if not cookiecutter.host_network %}networks:@@ -104,6 +106,7 @@ services:volumes:ldr_data:+ ldr_scripts:ollama_data:searxng_data:diff --git a/cookiecutter-docker/{{cookiecutter.config_name}}/ollama_entrypoint.sh b/cookiecutter-docker/{{cookiecutter.config_name}}/ollama_entrypoint.shdeleted file mode 100755index 950ac6e068..0000000000--- a/cookiecutter-docker/{{cookiecutter.config_name}}/ollama_entrypoint.sh+++ /dev/null@@ -1,27 +0,0 @@-#!/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 {{ cookiecutter._ollama_model }} with ollama pull..."-ollama pull {{ cookiecutter._ollama_model }}-# 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 infinitydiff --git a/docker-compose.yml b/docker-compose.ymlindex 9fc9b3159c..d028d4aff6 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -20,6 +20,7 @@ services:- LDR_DATA_DIR=/datavolumes:- ldr_data:/data+ - ldr_scripts:/scripts- ./local_collections/personal_notes:/local_collections/personal_notes/- ./local_collections/project_docs:/local_collections/project_docs/- ./local_collections/research_papers:/local_collections/research_papers/@@ -43,9 +44,9 @@ services:capabilities: [ gpu ]container_name: ollama_service- entrypoint: [ "/scripts/ollama_entrypoint.sh" ]+ entrypoint: "/scripts/ollama_entrypoint.sh ${MODEL:-gemma3:4b}"healthcheck:- test: [ "CMD", "ollama", "show", "gemma3:12b" ]+ test: [ "CMD", "ollama", "show", "${MODEL:-gemma3:12b}" ]interval: 10stimeout: 5sstart_period: 10m@@ -54,6 +55,7 @@ services:OLLAMA_KEEP_ALIVE: '30m'volumes:- ollama_data:/root/.ollama+ - ldr_scripts:/scripts- ./scripts/:/scripts/networks:- ldr-network@@ -74,6 +76,7 @@ services:volumes:ldr_data:+ ldr_scripts:ollama_data:searxng_data:networks:diff --git a/scripts/ollama_entrypoint.sh b/scripts/ollama_entrypoint.shindex 631d945ec9..344dc4577b 100755--- a/scripts/ollama_entrypoint.sh+++ b/scripts/ollama_entrypoint.sh@@ -2,6 +2,19 @@set -e+# Function to display usage information+usage() {+ echo "Usage: $0 <model_name>"+ exit 1+}++# Check if a model name is provided as an argument+if [ "$#" -ne 1 ]; then+ usage+fi++MODEL_NAME=$1+# Start the main Ollama applicationollama serve &@@ -13,8 +26,8 @@ doneecho "Ollama service is ready."# Pull the model using ollama pull-echo "Pulling the gemma3:12b with ollama pull..."-ollama pull gemma3:12b+echo "Pulling the $MODEL_NAME with ollama pull..."+ollama pull $MODEL_NAME# Check if the model was pulled successfullyif [ $? -eq 0 ]; thenecho "Model pulled successfully."@@ -25,3 +38,4 @@ fi# Run ollama forever.sleep infinity+```