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.

fix: address issues found in Docker optimization PR review (#2223)

LearningCircuitc96b93094bdc
diff --git a/.github/workflows/docker-tests.yml b/.github/workflows/docker-tests.yml
index 599187699a..6a5a94a3a4 100644
--- a/.github/workflows/docker-tests.yml
+++ b/.github/workflows/docker-tests.yml
@@ -22,6 +22,7 @@ jobs:
outputs:
llm: ${{ steps.filter.outputs.llm }}
infrastructure: ${{ steps.filter.outputs.infrastructure }}
+ docker: ${{ steps.filter.outputs.docker }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
@@ -47,6 +48,16 @@ jobs:
- 'src/local_deep_research/web/static/js/**'
- 'tests/infrastructure_tests/**'
- '.github/workflows/docker-tests.yml'
+ docker:
+ - 'Dockerfile'
+ - 'scripts/ldr_entrypoint.sh'
+ - 'scripts/ollama_entrypoint.sh'
+ - 'pyproject.toml'
+ - 'pdm.lock'
+ - 'package.json'
+ - 'package-lock.json'
+ - 'vite.config.js'
+ - '.github/workflows/docker-tests.yml'
# Build Docker image once and share via artifact
build-test-image:
@@ -716,6 +727,8 @@ jobs:
ldr-production-smoke-test:
runs-on: ubuntu-latest
name: Production Image Smoke Test
+ needs: detect-changes
+ if: needs.detect-changes.outputs.docker == 'true' || github.event_name == 'workflow_dispatch'
timeout-minutes: 30
permissions:
contents: read
@@ -789,8 +802,16 @@ jobs:
echo "OK: /home/ldruser owned by $HOME_OWNER"
echo "Checking playwright is accessible as ldruser..."
- gosu ldruser playwright --version
+ playwright --version
echo "OK: playwright accessible as ldruser"
+
+ echo "Checking playwright browsers are installed..."
+ if [ ! -d /home/ldruser/.cache/ms-playwright ]; then
+ echo "ERROR: Playwright browsers not found at /home/ldruser/.cache/ms-playwright"
+ exit 1
+ fi
+ ls /home/ldruser/.cache/ms-playwright/
+ echo "OK: playwright browsers directory exists and is accessible"
'
- name: Start production container
diff --git a/Dockerfile b/Dockerfile
index c50d657476..7c564451e4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -72,9 +72,10 @@ COPY package.json package.json
COPY package-lock.json* package-lock.json
COPY vite.config.js vite.config.js
-# Source files last (changes frequently) — keeps dependency layers cached
-# during rebuilds. Ordering within a stage does not affect the final filesystem;
-# the builder stage inherits all files from builder-base regardless of COPY order.
+# Source files last (changes most frequently). Note: with the current layout,
+# caching benefit is limited because all RUN commands (npm ci, npm run build,
+# pdm install) live in the builder stage which rebuilds when builder-base changes.
+# This ordering is still good practice for Dockerfile maintainability.
COPY src/ src
####
@@ -107,6 +108,8 @@ FROM builder-base AS ldr-test
# Note: Explicitly set even though inherited from builder-base for hadolint static analysis
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
+ARG DEBIAN_FRONTEND=noninteractive
+
# Install additional runtime dependencies for testing tools
# Note: Node.js is already installed from builder-base
# Using Acquire::Retries to handle transient Debian mirror errors during CI