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.

Refactor: Use CPU base + GPU override architecture

LearningCircuit281eab7b90e4
diff --git a/README.md b/README.md
index e5ca5b68ab..49a0135c83 100644
--- a/README.md
+++ b/README.md
@@ -142,9 +142,36 @@ you can get up and running quickly.
#### Option 2a: Quick Start (One Command)
-Choose the appropriate setup based on your system:
+**Default: CPU-only base (works on all platforms)**
-##### **Option 2a-GPU: With NVIDIA GPU Acceleration (Linux only)**
+The base configuration works on macOS (M1/M2/M3/M4 and Intel), Windows, and Linux without requiring any GPU hardware.
+
+**Quick Start Command:**
+
+Linux/macOS:
+
+```bash
+curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml && docker compose up -d
+```
+
+Windows (PowerShell):
+
+```powershell
+curl.exe -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml
+if ($?) { docker compose up -d }
+```
+
+**Use with a different model:**
+
+```bash
+curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml && MODEL=gpt-oss:20b docker compose up -d
+```
+
+---
+
+##### **Option 2a-GPU: Add NVIDIA GPU Acceleration (Linux only)**
+
+For users with NVIDIA GPUs who want hardware acceleration.
**Prerequisites:**
@@ -164,44 +191,27 @@ sudo systemctl restart docker
**Note:** For RHEL/CentOS/Fedora, Arch, or other Linux distributions, see the [NVIDIA Container Toolkit installation guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html).
-**Quick Start Command:**
+**Quick Start Commands:**
```bash
-curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml && docker compose up -d
+curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml && \
+curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.gpu.override.yml && \
+docker compose -f docker-compose.yml -f docker-compose.gpu.override.yml up -d
```
**Use with a different model:**
```bash
-curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml && MODEL=gpt-oss:20b docker compose up -d
+curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml && \
+curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.gpu.override.yml && \
+MODEL=gpt-oss:20b docker compose -f docker-compose.yml -f docker-compose.gpu.override.yml up -d
```
-##### **Option 2a-CPU: CPU-Only (macOS, Windows, or Linux without GPU)**
-
-**Recommended for:**
-- **macOS with Apple Silicon (M1/M2/M3/M4)** - Optimized for ARM64 architecture
-- macOS with Intel processors
-- Windows without NVIDIA GPU
-- Linux without NVIDIA GPU or nvidia-container-toolkit
-
-**Quick Start Commands:**
-
-Linux/macOS:
-
-```bash
-curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose-cpu.yml && docker compose -f docker-compose-cpu.yml up -d
-```
-
-Windows (PowerShell):
-
-```powershell
-curl.exe -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose-cpu.yml; if ($?) { docker compose -f docker-compose-cpu.yml up -d }
-```
-
-**Use with a different model:**
+**Optional: Create an alias for convenience**
```bash
-curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose-cpu.yml && MODEL=gpt-oss:20b docker compose -f docker-compose-cpu.yml up -d
+alias docker-compose-gpu='docker compose -f docker-compose.yml -f docker-compose.gpu.override.yml'
+# Then simply use: docker-compose-gpu up -d
```
---
diff --git a/docker-compose-cpu.yml b/docker-compose-cpu.yml
deleted file mode 100644
index f1057ed4d9..0000000000
--- a/docker-compose-cpu.yml
+++ /dev/null
@@ -1,129 +0,0 @@
-# ============================================================================
-# CPU-ONLY DOCKER COMPOSE (For Mac users and systems without NVIDIA GPU)
-# ============================================================================
-# This is identical to docker-compose.yml but with GPU acceleration removed.
-# Use this if you:
-# - Are on macOS (M1/M2/M3/M4 or Intel)
-# - Don't have an NVIDIA GPU
-# - Don't want to install nvidia-container-toolkit
-#
-# For GPU-accelerated setup, use docker-compose.yml instead.
-# ============================================================================
-
-services:
- local-deep-research:
- image: localdeepresearch/local-deep-research
-
- networks:
- - ldr-network
-
- ports:
- - "5000:5000"
- environment:
- # ============================================================================
- # IMPORTANT: Almost all settings can be configured through the web interface.
- #
- # Environment variables FORCE settings and prevent ANY changes through the UI.
- # These are NOT defaults - they are permanent overrides that lock the setting.
- # Only use environment variables if you want to enforce specific settings
- # that users should NEVER be able to change.
- #
- # After starting the container, configure your settings at:
- # http://localhost:5000/settings
- # ============================================================================
-
- # ============================================================================
- # DOCKER-SPECIFIC SETTINGS (Forced for good reasons!)
- # These settings are forced to ensure proper Docker operation:
- # - Prevents accidental misconfiguration that would break the container
- # - Ensures consistency between Docker configuration and application settings
- # - Users can still change ports via Docker's port mapping (see below)
- # ============================================================================
- - LDR_WEB_HOST=0.0.0.0 # Must bind to all interfaces for Docker networking
- - LDR_WEB_PORT=5000 # Internal port must match Docker's expectation
- - LDR_DATA_DIR=/data # Must match the volume mount point
-
- # ============================================================================
- # TO CHANGE PORTS: Use Docker port mapping, NOT the settings above!
- # Example - to expose on port 8080 instead of 5000:
- # ports:
- # - "8080:5000" # Maps host port 8080 to container port 5000
- #
- # This is the Docker way and avoids configuration mismatches.
- # ============================================================================
-
- # ============================================================================
- # DOCKER-COMPOSE SERVICE ENDPOINTS (Forced for proper container networking)
- # These are required for containers to communicate with each other.
- # Docker containers cannot use 'localhost' to reach other containers.
- # These settings override UI configuration for Docker Compose deployments.
- # Note: pip/local installs use localhost defaults and are unaffected.
- # ============================================================================
- - LDR_LLM_OLLAMA_URL=http://ollama:11434
- - LDR_SEARCH_ENGINE_WEB_SEARXNG_DEFAULT_PARAMS_INSTANCE_URL=http://searxng:8080
-
- # ============================================================================
- # ADVANCED: Uncomment ONLY if you need to enforce/lock these settings
- # WARNING: This will disable UI configuration for these settings!
- # ============================================================================
- # - LDR_LLM_PROVIDER=ollama # Lock the LLM provider
- # - LDR_LLM_MODEL=gemma3:12b # Lock the model selection
- # - LDR_LLM_OPENAI_API_KEY=sk-... # Lock OpenAI API key
- # - LDR_LLM_ANTHROPIC_API_KEY=sk-ant-... # Lock Anthropic API key
- volumes:
- - 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/
- restart: unless-stopped
- depends_on:
- ollama:
- condition: service_healthy
-
- searxng:
- condition: service_started
-
-
- ollama:
- image: ollama/ollama:0.12.6
- # Note: GPU acceleration disabled in this CPU-only variant
- # For GPU support, use docker-compose.yml instead
-
- container_name: ollama_service
- entrypoint: "/scripts/ollama_entrypoint.sh ${MODEL:-gemma3:12b}"
- healthcheck:
- test: [ "CMD", "ollama", "show", "${MODEL:-gemma3:12b}" ]
- interval: 10s
- timeout: 5s
- start_period: 10m
- retries: 2
- environment:
- OLLAMA_KEEP_ALIVE: '30m'
- volumes:
- - ollama_data:/root/.ollama
- - ldr_scripts:/scripts
- networks:
- - ldr-network
-
-
- restart: unless-stopped
-
- searxng:
- image: searxng/searxng:2025.10.23-e363db970
- container_name: searxng
- networks:
- - ldr-network
-
- volumes:
- - searxng_data:/etc/searxng
- restart: unless-stopped
-
-
-volumes:
- ldr_data:
- ldr_scripts:
- ollama_data:
- searxng_data:
-networks:
- ldr-network:
diff --git a/docker-compose.gpu.override.yml b/docker-compose.gpu.override.yml
new file mode 100644
index 0000000000..4b47bc3003
--- /dev/null
+++ b/docker-compose.gpu.override.yml
@@ -0,0 +1,33 @@
+# ============================================================================
+# NVIDIA GPU OVERRIDE (Adds GPU acceleration to base docker-compose.yml)
+# ============================================================================
+# This override file adds NVIDIA GPU support to the CPU-only base configuration.
+#
+# Prerequisites:
+# - NVIDIA GPU (Linux only)
+# - nvidia-container-toolkit installed
+# - See README.md for installation instructions
+#
+# Usage:
+# docker compose -f docker-compose.yml -f docker-compose.gpu.override.yml up -d
+#
+# Quick start with curl:
+# curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml
+# curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.gpu.override.yml
+# docker compose -f docker-compose.yml -f docker-compose.gpu.override.yml up -d
+#
+# Optional: Create an alias for convenience
+# alias docker-compose-gpu='docker compose -f docker-compose.yml -f docker-compose.gpu.override.yml'
+#
+# Future: For AMD GPU support, use docker-compose.amd.override.yml instead
+# ============================================================================
+
+services:
+ ollama:
+ deploy:
+ resources:
+ reservations:
+ devices:
+ - driver: nvidia
+ count: 1
+ capabilities: [ gpu ]
diff --git a/docker-compose.yml b/docker-compose.yml
index 9bf5b943cd..ef81c62f21 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,8 +1,16 @@
# ============================================================================
-# GPU-ACCELERATED DOCKER COMPOSE (Requires NVIDIA GPU + nvidia-container-toolkit)
+# DOCKER COMPOSE BASE CONFIGURATION (CPU-only, works on all platforms)
# ============================================================================
-# For macOS or systems without NVIDIA GPU, use docker-compose-cpu.yml instead:
-# docker compose -f docker-compose-cpu.yml up -d
+# This base configuration works on:
+# - macOS (M1/M2/M3/M4 Apple Silicon and Intel)
+# - Windows
+# - Linux (with or without GPU)
+#
+# To add NVIDIA GPU acceleration:
+# docker compose -f docker-compose.yml -f docker-compose.gpu.override.yml up -d
+#
+# See docker-compose.gpu.override.yml for GPU setup details.
+# Future: docker-compose.amd.override.yml will support AMD GPUs.
# ============================================================================
services:
@@ -82,13 +90,9 @@ services:
ollama:
image: ollama/ollama:0.12.6
- deploy: # Remove this entire 'deploy' section if you don't have an Nvidia GPU or nvidia-container-toolkit installed.
- resources:
- reservations:
- devices:
- - driver: nvidia
- count: 1
- capabilities: [ gpu ]
+ # Note: GPU acceleration disabled by default (CPU-only base)
+ # For NVIDIA GPU support, use docker-compose.gpu.override.yml
+ # For AMD GPU support (future), use docker-compose.amd.override.yml
container_name: ollama_service
entrypoint: "/scripts/ollama_entrypoint.sh ${MODEL:-gemma3:12b}"