This page provides technical guidance for installing Docling and its optional dependencies. It covers the core installation, the modular docling-slim package, feature-specific extras (OCR, VLM, ASR), hardware acceleration, and platform-specific considerations.
Docling uses a modular package structure to provide a lightweight base and fine-grained control over dependencies pyproject.toml1-58 packages/docling/pyproject.toml1-55
docling-slim: The core package containing the docling Python module, CLI logic, and minimal dependencies (~50MB) pyproject.toml6-8 pyproject.toml48-58 It provides the docling_defaults entry point for model plugins pyproject.toml66-67docling: A meta-package that pulls in docling-slim with a standard set of extras for a batteries-included experience packages/docling/pyproject.toml6-8 packages/docling/pyproject.toml53-55For most users, installing the meta-package is recommended:
This installs docling-slim with the standard bundle, which includes local models, PDF support (docling-parse and pypdfium2), Office formats, web formats, and basic OCR via rapidocr pyproject.toml103-105 pyproject.toml120-122 pyproject.toml138-140
For environments where disk space or dependency surface is critical, use docling-slim:
Note that docling-slim without extras does not include OCR engines or advanced AI models pyproject.toml48-58 The CLI requires the cli extra to function pyproject.toml69-72 docling/cli/main.py16-33
Sources: pyproject.toml6-8 pyproject.toml48-58 pyproject.toml69-72 packages/docling/pyproject.toml50-55 docling/cli/main.py16-33
Docling uses a modular approach for heavy dependencies. These are defined as optional dependencies in docling-slim and re-exported by the docling meta-package pyproject.toml74-245 packages/docling/pyproject.toml76-86
| Extra | Feature | Implementation / Engine |
|---|---|---|
feat-ocr-easyocr | OCR | Installs EasyOCR pyproject.toml198-204 |
feat-ocr-tesserocr | OCR | Installs Tesseract bindings and pandas pyproject.toml206-209 |
feat-ocr-mac | OCR | macOS-native OCR (Apple Vision) pyproject.toml211-213 |
feat-ocr-rapidocr | OCR | Installs RapidOCR pyproject.toml189-191 |
models-vlm-inline | VLM Pipeline | transformers, accelerate, and mlx-vlm pyproject.toml241-248 |
format-audio | ASR Pipeline | openai-whisper and mlx-whisper pyproject.toml170-175 |
format-video | Video Pipeline | format-audio + speaker diarization pyproject.toml178-184 |
format-html-render | HTML Rendering | Installs playwright for headless browsing pyproject.toml166-168 |
format-xml-xbrl | XBRL Support | Installs arelle-release pyproject.toml162-164 |
models-remote | Remote Models | tritonclient for KServe v2 integration pyproject.toml231-233 |
Sources: pyproject.toml74-245 packages/docling/pyproject.toml76-86
Docling manages hardware resources through its configuration system. It supports CPU, CUDA, and Apple Silicon (MPS/MLX) acceleration.
The system resolves hardware devices during DocumentConverter initialization docling/document_converter.py131-146 Users can configure this via AcceleratorOptions docling/datamodel/accelerator_options.py28-50 which determines the AcceleratorDevice docling/datamodel/accelerator_options.py10-25
Hardware Resolution Flow
Sources: docling/datamodel/accelerator_options.py10-50 docling/datamodel/pipeline_options.py112-128 docling/document_converter.py131-146
Docling local models depend on torch (>=2.2.2,<3.0.0) pyproject.toml223 For NVIDIA GPUs, ensure a compatible PyTorch build is installed. The models-onnxruntime extra provides onnxruntime-gpu for Linux and Windows pyproject.toml235-238
Apple Silicon is natively supported. The models-vlm-inline and format-audio extras include mlx-vlm and mlx-whisper respectively for optimized inference on M-series chips pyproject.toml246 pyproject.toml171
Sources: pyproject.toml223 pyproject.toml235-238 pyproject.toml246 pyproject.toml171
To use Tesseract-based OCR engines, the Tesseract binary and language data must be installed on the host system docs/getting_started/installation.md92-103
brew install tesseract leptonica pkg-config docs/getting_started/installation.md135apt-get install tesseract-ocr tesseract-ocr-eng libtesseract-dev libleptonica-dev pkg-config docs/getting_started/installation.md143Important: Set the TESSDATA_PREFIX environment variable to the location of your tessdata folder docs/getting_started/installation.md129-130
For contributors, Docling uses uv for environment management uv.lock1-30
This command synchronizes the workspace, which includes both docling-slim and the docling meta-package uv.lock26-30
Sources: docs/getting_started/installation.md92-152 uv.lock26-30
The following diagram illustrates how installation bundles and configuration classes interact to provision the system.
Package to Entity Mapping
Sources: pyproject.toml6-8 packages/docling/pyproject.toml6-8 docling/datamodel/pipeline_options.py118-128 docling/datamodel/pipeline_options.py164-205
Newer PyTorch versions (2.6.0+) have dropped support for Intel Macs. Docling provides guidance for using torch==2.2.2 and torchvision==0.17.2 docs/getting_started/installation.md49-66
For servers without GPUs, use the PyTorch CPU wheel docs/getting_started/installation.md19-25
Sources: docs/getting_started/installation.md19-66 pyproject.toml223
Refresh this wiki