diff --git a/docs/content/Guides/ocr.mdx b/docs/content/Guides/ocr.mdx
index 8bac7e9b..e3da0f49 100644
--- a/docs/content/Guides/ocr.mdx
+++ b/docs/content/Guides/ocr.mdx
@@ -72,10 +72,12 @@ there, point `OCR_ENGINE=deepseek` at a DeepSeek-OCR endpoint or install
unaffected).
-**Upgrading:** earlier images always included tesseract. If your deployment
-runs `OCR_ENABLED=true` with the `tesseract` engine, add
-`INSTALL_TESSERACT=true` to `.env` before rebuilding, or OCR of scanned pages
-stops working after the rebuild.
+**Upgrading:** earlier images always included docling, and OCR ran through the
+RapidOCR engine bundled with it, so no system package was needed. The default
+image now ships neither docling nor tesseract. If your deployment uses the
+`tesseract` engine (the default) with `OCR_ENABLED=true` or
+`OCR_ATTACHMENTS_ENABLED=true`, add `INSTALL_TESSERACT=true` to `.env` before
+rebuilding, or OCR of scanned pages stops working after the rebuild.
## Installing the docling engine
diff --git a/setup.ps1 b/setup.ps1
index 796c4a2d..318f04fe 100644
--- a/setup.ps1
+++ b/setup.ps1
@@ -508,16 +508,28 @@ function Configure-DocProcessing {
Write-ColorText "PDF-as-image parsing enabled." -ForegroundColor "Green"
}
+ # OCR needs the tesseract binary, an optional system package that only
+ # locally built images can include (INSTALL_TESSERACT build arg). The
+ # pre-built Docker Hub images ship without it, so there OCR stays off
+ # (its default) rather than being switched on to fail on every scan.
+ if ($COMPOSE_FILE -ne $COMPOSE_FILE_LOCAL) {
+ Write-ColorText "OCR for scanned PDFs and images stays off: the pre-built Docker Hub images do not include tesseract. To use OCR, rerun setup and choose option 5 (build images locally), or use a DeepSeek-OCR endpoint by adding OCR_ENABLED=true, OCR_ENGINE=deepseek and OCR_DEEPSEEK_URL= to .env." -ForegroundColor "Yellow"
+ return
+ }
+
$ocr_enabled = Read-Host "Enable OCR for scanned PDFs and images? (y/N)"
if ($ocr_enabled -eq "y" -or $ocr_enabled -eq "Y") {
"OCR_ENABLED=true" | Add-Content -Path $ENV_FILE -Encoding utf8
- Write-ColorText "OCR enabled (tesseract, shipped in the Docker image; set OCR_ENGINE=deepseek for a DeepSeek-OCR endpoint)." -ForegroundColor "Green"
+ # Bakes tesseract into the locally built images (docker compose
+ # --env-file .env build).
+ "INSTALL_TESSERACT=true" | Add-Content -Path $ENV_FILE -Encoding utf8
+ Write-ColorText "OCR enabled. tesseract will be built into the images (INSTALL_TESSERACT=true); set OCR_ENGINE=deepseek in .env for a DeepSeek-OCR endpoint instead." -ForegroundColor "Green"
$docling_ocr = Read-Host "Also install the Docling layout engine for OCR (better tables/reading order, several GB heavier)? (y/N)"
if ($docling_ocr -eq "y" -or $docling_ocr -eq "Y") {
- # Honoured by locally built images (docker compose --env-file .env build);
- # pre-built Docker Hub images do not include docling.
+ # Locally built images include docling via this build arg; it becomes
+ # the OCR backend automatically (OCR_BACKEND=auto).
"INSTALL_DOCLING=true" | Add-Content -Path $ENV_FILE -Encoding utf8
- Write-ColorText "Docling will be built into locally built images (pre-built Docker Hub images are unaffected)." -ForegroundColor "Green"
+ Write-ColorText "Docling will be built into locally built images (docker compose --env-file .env build). Pre-built Docker Hub images do not include it." -ForegroundColor "Green"
}
}
}