Commit graph

9 commits

Author SHA1 Message Date
Pier-Jean Malandrino
4088a8b8dd chore(#254): bake Docling model checkpoints into the local image
Eliminates the ~1.3 GB cold-start download on the first conversion. The
new BAKE_MODELS build-arg defaults to true; pass --build-arg
BAKE_MODELS=false to skip and keep the smaller 1.9 GB image when the
deployment can tolerate a slow first run.

Drop the hf_cache volume from compose — a named-volume mount on top of
the baked path would mask the prefetched models with an empty volume on
first 'docker compose up'. The image is now self-contained.

Measured on arm64:
  - latest-local without bake : 1.89 GB
  - latest-local WITH bake    : 3.19 GB (still -48% vs 6.09 GB baseline)
2026-05-11 09:38:32 +02:00
Pier-Jean Malandrino
0b544bdaef chore(#254): slim latest-local image (multi-stage + opt-in reasoning)
- Move docling-agent + mellea out of requirements.txt into a dedicated
  requirements-reasoning.txt. They are no longer pulled into latest-remote
  (regression fix) nor into latest-local by default.
- Dockerfile: split into builder-remote / builder-local / runtime-base
  stages. The runtime image carries no pip and no build cache; the source
  is COPYed only in the final stages so a code-only change reuses every
  pip-install layer.
- Add WITH_REASONING build-arg (default false) on the local target. Set to
  true to bundle the R&D reasoning-trace deps for a local-reasoning image.
- Harden .dockerignore: tests/, data/, uploads/, IDE files, stray
  node_modules / package-lock.json, the one-shot migrate_06.py utility.
- Set HF_HOME so the Docling/HF model cache lands in a deterministic
  appuser-owned path that compose can mount as a volume.
2026-05-11 09:38:32 +02:00
Pier-Jean Malandrino
48c5e4ea6b Fix RapidOCR model download permission in local image
Grant appuser write access to rapidocr/models directory so OCR
models can be downloaded at runtime.
2026-04-03 10:44:20 +02:00
Pier-Jean Malandrino
48b7d5d3e8 Use CPU-only torch in local image to reduce size from 5.8GB to 1.9GB
Install torch and torchvision from the CPU-only index before docling
to avoid pulling CUDA/nvidia/triton dependencies. Update documentation
with measured image sizes (270MB remote, 1.9GB local).
2026-04-03 09:52:22 +02:00
Pier-Jean Malandrino
9ac0840607 Add multi-target Dockerfiles for remote and local builds
Both root and backend Dockerfiles now use a shared base stage with
two targets: remote (lightweight, ~300MB) and local (full Docling,
~2-3GB). docker-compose uses CONVERSION_MODE to select the target.
2026-04-03 09:24:41 +02:00
pjmalandrino
2db251182f Refacto and add cp paste btn 2026-03-21 15:03:10 +01:00
pjmalandrino
5fff141045 Radical architecture change, migration to a more lightweight 2026-03-17 16:06:27 +01:00
pjmalandrino
4c6aff3029 Work on full Docker integration 2026-03-17 13:33:36 +01:00
pjmalandrino
50ba1d43dd Make a nex project base, managing new Docling version 2026-03-17 08:43:00 +01:00