Commit Graph
40 Commits
Author SHA1 Message Date
Alex aecb596e99 build(docker): slim backend image, static frontend image, -docling variant
Backend (arc53/docsgpt): 4.5 GB compressed -> 0.9 GB with both embedding
models and tiktoken baked in.
- torch/transformers gone from the default install (docling extra only).
- Ubuntu 24.04 ships python3.12: no deadsnakes PPA, no software-properties-
  common; every pin is a wheel, so no gcc/g++/rust in the builder.
- COPY --chown and a prefetch that runs as the process user replace the
  trailing chown -R, which duplicated the 600 MB model layer.
- .dockerignore keeps __pycache__, .coverage, local indexes and .env out.
- EXTRAS build arg (INSTALL_DOCLING kept as an alias); the docling variant
  also bakes docling's layout/table/RapidOCR models (DOCLING_ARTIFACTS_PATH)
  and tesseract, and drops only the discovery documents of Google APIs the
  app never builds.
- FLASK_DEBUG env removed (unused); OCI labels added.

Frontend (arc53/docsgpt-fe): 302 MB Vite dev server -> 25 MB static build
behind nginx. VITE_* variables are injected at container start into
/config.js and read through src/env.ts, so the image no longer needs a
rebuild per deployment; docker-compose.yaml keeps hot reload via the dev
target.

Publishing: every release and develop build now pushes a slim tag and a
-docling tag (docling engine + models + tesseract). docker-compose-hub.yaml
takes DOCSGPT_IMAGE_TAG / DOCSGPT_IMAGE_VARIANT; docker-compose-standalone.yaml
runs the stack from pre-built images without a checkout and is attached to
each release. setup.sh selects the -docling variant for OCR instead of
requiring a local build. A new workflow builds the image on PRs that touch
it and runs verify_offline under --network none; lint checks the exported
requirements match uv.lock.
2026-09-05 15:50:21 +01:00
Alex 3947c66cda Merge branch 'main' into anydoc-support
Conflicts, and how each was taken:

- application/core/settings.py — ours. The renamed OCR_ENABLED /
  OCR_ATTACHMENTS_ENABLED / OCR_MIN_CHARS_PER_PAGE accept main's
  DOCLING_OCR_* spellings as AliasChoices, so nothing is dropped.
- application/Dockerfile — both. Main's install layers plus the
  INSTALL_DOCLING build arg.
- application/parser/file/constants.py — both imports.
- deployment/docker-compose.yaml — both. The INSTALL_DOCLING /
  INSTALL_TESSERACT build args on backend and worker, and main's
  -Q docsgpt,parsing,embeddings, which query embedding needs.
- tests/conftest.py — theirs. Both sides fixed the same pytest-postgresql
  9.0.0 autocommit= breakage; main's spelling is the one already on main.
- application/requirements.txt — the comments claimed different reasons
  torch is in core. Main's is the true one now: it removed
  sentence-transformers, so docling is torch's only remaining consumer.

Two things the merge broke without conflicting:

- onnxruntime. This branch moved it out of core into the docling extra;
  main meanwhile made it the runtime local embeddings execute on
  (fastembed). Git took the deletion, leaving fastembed with no pinned
  runtime in a repo that pins everything. Restored to core, and no longer
  pinned twice from the extra.
- The frontend copy of ATTACHMENT_PARSER_EXTENSIONS. The backend list is
  derived and picked up the anydoc suffixes; the hand-kept frontend mirror
  did not, so the composer would refuse files the API accepts.
  tests/parser/file/test_constants.py is what caught it.

ruff, pytest (9897 passed), frontend build and docs build all pass. The
image build is unverified: no Docker daemon on this machine.
2026-09-04 16:42:48 +01:00
Alex b473498baf 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.
2026-09-04 15:28:29 +01:00
Pavel 6276158d0d Small fixes 3 2026-09-04 17:45:38 +04:00
Pavel 4e14a79923 Fixes batch 2 2026-09-04 13:38:29 +04:00
Pavel ed0892b39b Batch fixes 2 2026-09-03 00:30:59 +04:00
Pavel 96b878217d standalone OCR 2026-09-02 23:12:36 +04:00
Pavel d7a7d4d084 docling separation 2026-08-27 17:36:38 +04:00
Alex 8380f9bb47 feat: optimise embeds 2026-08-26 14:46:19 +01:00
Alex 27f9ddc8e0 fix: address PR review — Responses input encoding + finish Azure removal
- Replay prior-turn assistant text as input_text, not output_text: a
  Responses easy-input message only accepts input_* content parts, so the
  old shape would 400 on the second turn of every conversation (default
  store=false resends prior turns inline).
- Always request include=["reasoning.encrypted_content"] so in-turn
  reasoning carryover works whether or not the response is also stored
  server-side (OPENAI_RESPONSES_STORE).
- Add detail="auto" to input_image parts.
- Remove the now-dead azure_openai option from setup.sh / setup.ps1 and
  the docs, completing the AzureOpenAILLM removal.
- Tests: correct the input_text / image-detail / include assertions and
  add parallel tool-call and stream-error coverage.
2026-06-03 14:56:28 +01:00
Alex d9a92a7208 feat: improve setup scripts 2026-04-03 17:15:21 +01:00
Alex-wuhu eaf39bb15b feat: add Novita AI as LLM provider
Add Novita AI (https://novita.ai) as a new LLM provider option.
Novita offers OpenAI-compatible API endpoints with competitive pricing.
2026-03-23 10:52:26 +08:00
Pavel 8aa44c415b Advanced settings (#2281)
Add additional settings to setup scripts
2026-02-17 11:54:59 +00:00
Pavel e7d2af2405 Setup plus env fixes (#2265)
* fixes setup scripts

fixes to env handling in setup script plus other minor fixes

* Remove var declarations

Declarations such as `LLM_PROVIDER=$LLM_PROVIDER` override .env variables in compose

Similar issue is present in the frontend - need to choose either to switch to separate frontend env or keep as is.

* Manage apikeys in settings

1. More pydantic management of api keys.
2. Clean up of variable declarations from docker compose files, used to block .env imports. Now should be managed ether by settings.py defaults or .env
2026-01-22 12:21:01 +02:00
Siddhant Rai 9da4215d1f feat: implement Docker Hub integration for building and pushing images in CI/CD workflow 2025-08-28 12:01:04 +05:30
Ankit Matth b3af4ee50b speed up scripts by using docker hub 2025-08-24 08:59:19 +05:30
Alex aaecf52c99 refactor: update docs LLM_NAME and MODEL_NAME to LLM_PROVIDER and LLM_NAME 2025-06-11 12:30:34 +01:00
Pavel dbb822f6b0 fix for OPENAI_BASE_URL + ollama can't connect to container
- fix for OpenAI trying to use base_url=""
- fix for ollama container error:
`Error code: 404 - {'error': {'message': 'model "MODEL_NAME" not found, try pulling it first', 'type': 'api_error', 'param': None, 'code': None}}`
2025-05-15 13:50:08 +04:00
rock.lee 6968317db2 fix: docker compose up doesn't use the env and setup script will not exit when service start success 2025-03-14 17:09:10 +08:00
rock.lee 867c375843 add novita provider 2025-03-08 15:45:49 +08:00
Pavel 385ebe234e setup+development-docs 2025-02-11 19:17:59 +03:00
Piotr Idzik 568ab33a37 style: use underscore for an unused loop variable (#1593)
This addresses the SC2034 warning.
2025-02-09 22:56:52 +00:00
Alex 0913c43219 feat: edit deploymen files locations 2025-02-05 18:04:41 +00:00
shatanikmahanty ec5db5d2c7 Refactor: remove docker start script for windows platform 2024-10-11 11:50:18 +05:30
shatanikmahanty cc25b5e856 Feat: Add ability to start docker if it's not running 2024-10-11 11:37:12 +05:30
Pavel 001c450abb choice text 2024-01-09 13:05:16 +03:00
Pavel ceaa5763d4 choice fix 2024-01-09 12:57:19 +03:00
Alex 0ab32a6f84 Update setup.sh script with new options for language model usage 2024-01-09 00:07:37 +00:00
Alex 71cc22325d Add application files and update setup script 2024-01-09 00:05:44 +00:00
Alex 5b12423d98 setup-fix2 2023-11-21 10:16:54 +00:00
Alex 4141f633a3 Setup process 2023-11-21 10:16:10 +00:00
John Bampton 034d73a4eb misc: fix spelling 2023-10-04 05:18:15 +10:00
Alex cd9b03bdb9 celery syncs 2023-10-01 20:05:13 +01:00
Alex a619269502 celery bugs 2023-10-01 19:55:11 +01:00
Alex 9a33bf2210 script + cpu optimisations 2023-10-01 19:16:13 +01:00
Alex 9bbf4044e0 script 2023-10-01 17:20:47 +01:00
Idan 2404899e28 Fixed request length bug, changed to as less used port 2023-06-23 14:56:14 +03:00
Darth Pika 0beafb8391 Update setup.sh
This script includes the necessary changes to use container linking and updated environment variables for the `backend` and `worker` containers.

Make sure you have the `./frontend` and `./application` directories in the correct locations before running the script.
2023-04-27 12:39:03 -07:00
Darth Pika 1d2654b9fa Update setup.sh
Create required directories on the host machine if they don't exist.
2023-04-27 12:02:11 -07:00
Darth Pika a4bc3673e7 Create setup.sh
Added a bash script to help with installation issues.
2023-04-27 11:40:25 -07:00