CPU-only server (recommended without a GPU)#
sudo apt-get update && sudo apt-get install -y python3-venv # Debian/Ubuntu
python3 -m venv ~/docling-env && source ~/docling-env/bin/activate
pip install -U pip
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
pip install docling
docling --versionThis is exactly the sequence we use for our benchmarks. The environment was 1.8 GB on disk, plus 0.5 GB of models after the first conversion.
File sizes read from PyPI and download.pytorch.org metadata by docling.org on 6 Nov 2026.
Show data table
| GB | |
|---|---|
| CPU build (download.pytorch.org/whl/cpu) | 0.21 GB |
| Default PyPI build (CUDA 13 dependencies) | 2.98 GB |
With an NVIDIA GPU#
nvidia-smi # note "CUDA Version: XX.X" (driver maximum)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu132 # torch 2.15.0, driver CUDA ≥ 13.2; older drivers: cu130 or cu126 (torch 2.14.1)
pip install docling
python -c "import torch; print(torch.__version__, torch.cuda.is_available())"
docling convert report.pdf --device cudaThe CUDA version shown by nvidia-smi is the newest your driver supports; choose a PyTorch build at or below it. We confirmed torch 2.15.0 builds on the cu132 and cu134 indexes; cu130 and cu126 stop at torch 2.14.1, which Docling also runs on (the cu128 index stops at torch 2.11.0). With uv, uv pip install --torch-backend auto docling detects the driver for you.
Optional system packages#
| Feature | Debian / Ubuntu | Fedora / RHEL |
|---|---|---|
| Tesseract OCR engine | apt-get install tesseract-ocr tesseract-ocr-deu | dnf install tesseract tesseract-langpack-deu |
| tesserocr (C API) build deps | apt-get install libtesseract-dev libleptonica-dev pkg-config | dnf install tesseract-devel leptonica-devel |
| .doc / .ppt / .xls / .rtf | apt-get install libreoffice-core libreoffice-writer libreoffice-calc libreoffice-impress | dnf install libreoffice-core libreoffice-writer libreoffice-calc libreoffice-impress |
| Audio and video | apt-get install ffmpeg | dnf install ffmpeg (RPM Fusion) |
Replace deu with the Tesseract language codes you need (fra, chi-sim/chi_sim, jpn…). Package names vary slightly between distributions.
Headless servers and services#
- Pre-download models with
docling-tools models downloadduring provisioning so the first request is not slow. - Limit threads per process with
--num-threadsorOMP_NUM_THREADSwhen running several workers on one machine. - Run as a service with docling-serve (systemd or container) instead of spawning a CLI per file — models stay loaded.
- Set a document timeout (
--document-timeout 300) so one bad file cannot block a queue.
ARM64#
Docling 2.148.0 and PyTorch 2.15.0 resolve for aarch64 Linux (checked with uv's resolver for Python 3.12), and the official docling-serve images, including the CUDA ones, are published for linux/arm64.
Frequently asked questions
Does Docling work on ARM64 Linux (Graviton, Ampere, Raspberry Pi 5)?
Yes. Docling's wheels and PyTorch 2.15.0 resolve for aarch64 Linux (we checked with uv's resolver), and the official docling-serve images are published for linux/arm64.
Which system packages does Docling need on Ubuntu?
None for the default install — all dependencies come as Python wheels. Install tesseract-ocr only for the Tesseract engine, libreoffice for legacy Office files and RTF, and ffmpeg for audio and video.
How do I make Docling use my NVIDIA GPU on Linux?
Install a CUDA-enabled PyTorch that your driver supports (check nvidia-smi), then run docling with --device cuda or leave the default auto. python -c "import torch; print(torch.cuda.is_available())" must print True.