Skip to content

Latest commit

 

History

History
212 lines (143 loc) · 4.27 KB

File metadata and controls

212 lines (143 loc) · 4.27 KB

Installation

Overview

Docling Graph is available on PyPI. Install with pip for the recommended experience, or clone the repository and use uv for development.

What You'll Install

  1. Core Package: Docling Graph with VLM support
  2. Optional Features: LLM providers (local and/or remote) via LiteLLM (included by default)
  3. GPU Support (optional): PyTorch with CUDA for local inference
  4. API Keys (optional): For remote LLM providers

Quick Start

Install from PyPI (Recommended)

pip install docling-graph

This installs:

  • ✅ Docling (document conversion)
  • ✅ VLM backend (NuExtract models)
  • ✅ Core graph functionality
  • ✅ LiteLLM (for LLM providers; no extra install needed)

Run the CLI with:

docling-graph --version
docling-graph --help

Install from Source (Development)

To contribute or use the latest development version:

git clone https://github.com/docling-project/docling-graph
cd docling-graph
uv sync

Use uv run docling-graph when running the CLI from a source checkout.

System Requirements

Minimum Requirements

  • Python: 3.10, 3.11, or 3.12
  • RAM: 8 GB minimum
  • Disk: 5 GB free space
  • OS: Linux, macOS, or Windows (with WSL recommended)

Recommended for Local Inference

  • GPU: NVIDIA GPU with 8+ GB VRAM
  • CUDA: 11.8 or 12.1
  • RAM: 16 GB or more
  • Disk: 20 GB free space (for models)

For VLM Only

  • GPU: NVIDIA GPU with 4+ GB VRAM (for NuExtract-2B)
  • GPU: NVIDIA GPU with 8+ GB VRAM (for NuExtract-8B)

For Remote API Only

  • No GPU required
  • Internet connection required
  • API keys required

Verification

Check Installation

# Check version (use docling-graph if installed via pip; uv run docling-graph if from source)
docling-graph --version

# Test CLI
docling-graph --help

Expected output:

Docling Graph v1.2.0
Usage: docling-graph [OPTIONS] COMMAND [ARGS]...

Test Import

python -c "import docling_graph; print(docling_graph.__version__)"

Expected output:

v1.2.0

Next Steps

After installation, you need to:

  1. Set Up Requirements - Verify system requirements
  2. Configure GPU (optional) - Set up CUDA for local inference
  3. Set Up API Keys (optional) - Configure remote providers
  4. Define Schema - Create your first Pydantic template

Common Issues

🐛 uv not found (source install only)

If you install from source, you need uv. Install it with:

# Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# Or with pip
pip install uv

🐛 Python version mismatch (source install)

When using uv from source, specify Python version if needed:

uv python install 3.10
uv sync

🐛 Import errors after installation

Solution: If you installed from source with uv, run scripts and the CLI via uv run:

uv run python script.py
uv run docling-graph --help

If you installed with pip, use python and docling-graph directly.

🐛 GPU not detected

Solution: See GPU Setup Guide

Performance Notes

New in v1.2.0: Significant CLI performance improvements:

  • Init command: 75-85% faster with intelligent dependency caching
    • First run: ~1-1.5s (checks dependencies)
    • Subsequent runs: ~0.5-1s (uses cache)
  • Dependency validation: 90-95% faster (2-3s → 0.1-0.2s)
  • Lazy loading: Configuration constants loaded on-demand

Development Installation

For contributing to the project:

# Clone repository
git clone https://github.com/docling-project/docling-graph
cd docling-graph

# Install with development dependencies
uv sync --all-extras --dev

# Install pre-commit hooks
uv run pre-commit install

# Run tests
uv run pytest

Updating

If you installed from PyPI:

pip install -U docling-graph

If you installed from source:

git pull origin main
uv sync

Uninstalling

If you installed from PyPI:

pip uninstall docling-graph

If you installed from source:

rm -rf .venv
cd ..
rm -rf docling-graph