mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 02:14:23 +00:00
fix(setup,docs): rebuild locally built images, name OCR_DEEPSEEK_URL
Both setup scripts start with `compose pull && compose up -d`. In the local compose file backend and worker are build-only services, so `up -d` builds only when no image exists yet: a rerun that switches OCR on wrote INSTALL_TESSERACT=true to .env and then reused the image built without it, leaving OCR_ENABLED=true with no engine. Build explicitly on the local compose path; the hub path stays pull-only, its services have no build stage. The OCR message named OCR_ENGINE=deepseek but not OCR_DEEPSEEK_URL, whose default (localhost:11434) resolves to the container, not the host. deployment/sandbox/README.md still described Docling as already present in application/requirements.txt.
This commit is contained in:
1 parent
2a9a02427f
commit
b473498baf
3 files changed
+22
-6
No files matched your search
@@ -188,8 +188,10 @@ Daytona render output matches the Jupyter-backend output.
|
||||
|
||||
Document reading no longer runs in this sandbox. The `read_document` tool and the
|
||||
workflow native-file extract branch enqueue a `parse_document` Celery task that
|
||||
parses the document **in the backend** (Docling, already in
|
||||
`application/requirements.txt`) and awaits the result. The task is routed to a
|
||||
parses the document **in the backend** (the `DOC_PARSER_ENGINE` parser — anydoc
|
||||
by default; Docling only when the optional
|
||||
`application/requirements-docling.txt` extra is installed) and awaits the
|
||||
result. The task is routed to a
|
||||
dedicated **`parsing` queue** (`settings.DOCUMENT_PARSE_QUEUE`, default
|
||||
`"parsing"`) so a parse enqueued from inside a Celery worker (headless/scheduled
|
||||
agent) is served by a separate worker and never self-deadlocks the awaiting one.
|
||||
|
||||
@@ -523,7 +523,7 @@ function Configure-DocProcessing {
|
||||
# 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"
|
||||
Write-ColorText "OCR enabled. tesseract will be built into the images (INSTALL_TESSERACT=true); for a DeepSeek-OCR endpoint instead, set OCR_ENGINE=deepseek and OCR_DEEPSEEK_URL=<endpoint> in .env." -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") {
|
||||
# Locally built images include docling via this build arg; it becomes
|
||||
@@ -647,7 +647,14 @@ function Use-DocsPublicAPIEndpoint {
|
||||
throw "Docker compose pull failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
& docker compose --env-file "$ENV_FILE" -f "$COMPOSE_FILE" up -d
|
||||
# Locally built images must be rebuilt rather than reused:
|
||||
# INSTALL_TESSERACT and INSTALL_DOCLING are build args, so a rerun that
|
||||
# switches OCR on would otherwise keep the image built without them.
|
||||
$up_args = @("up", "-d")
|
||||
if ($COMPOSE_FILE -eq $COMPOSE_FILE_LOCAL) {
|
||||
$up_args = @("up", "--build", "-d")
|
||||
}
|
||||
& docker compose --env-file "$ENV_FILE" -f "$COMPOSE_FILE" @up_args
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Docker compose up failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ configure_doc_processing() {
|
||||
# Bakes tesseract into the locally built images (docker compose
|
||||
# --env-file .env build).
|
||||
echo "INSTALL_TESSERACT=true" >> "$ENV_FILE"
|
||||
echo -e "${GREEN}OCR enabled. tesseract will be built into the images (INSTALL_TESSERACT=true); set OCR_ENGINE=deepseek in .env for a DeepSeek-OCR endpoint instead.${NC}"
|
||||
echo -e "${GREEN}OCR enabled. tesseract will be built into the images (INSTALL_TESSERACT=true); for a DeepSeek-OCR endpoint instead, set OCR_ENGINE=deepseek and OCR_DEEPSEEK_URL=<endpoint> in .env.${NC}"
|
||||
read -p "$(echo -e "${DEFAULT_FG}Also install the Docling layout engine for OCR (better tables/reading order, several GB heavier)? (y/N): ${NC}")" docling_ocr
|
||||
if [[ "$docling_ocr" =~ ^[yY]$ ]]; then
|
||||
# Locally built images include docling via this build arg; it becomes
|
||||
@@ -469,7 +469,14 @@ use_docs_public_api_endpoint() {
|
||||
check_and_start_docker
|
||||
|
||||
echo -e "\n${NC}Starting Docker Compose...${NC}"
|
||||
docker compose --env-file "${ENV_FILE}" -f "${COMPOSE_FILE}" pull && docker compose --env-file "${ENV_FILE}" -f "${COMPOSE_FILE}" up -d
|
||||
# Locally built images must be rebuilt rather than reused: INSTALL_TESSERACT
|
||||
# and INSTALL_DOCLING are build args, so a rerun that switches OCR on would
|
||||
# otherwise keep the image that was built without them.
|
||||
up_args=(up -d)
|
||||
if [ "$COMPOSE_FILE" = "$COMPOSE_FILE_LOCAL" ]; then
|
||||
up_args=(up --build -d)
|
||||
fi
|
||||
docker compose --env-file "${ENV_FILE}" -f "${COMPOSE_FILE}" pull && docker compose --env-file "${ENV_FILE}" -f "${COMPOSE_FILE}" "${up_args[@]}"
|
||||
docker_compose_status=$? # Capture exit status of docker compose
|
||||
|
||||
echo "Docker Compose Exit Status: $docker_compose_status"
|
||||
|
||||
Reference in new issue
Block a user