Independent guide — not affiliated with IBM or the Docling project. Every command verified on Docling 2.148.0.
  1. Home
  2. Install
  3. Linux
Install · Linux

Install Docling on Linux — lean on servers, fast on GPUs

Linux is where we run our own tests. The one decision that matters: which PyTorch build to install. Get that right and a Docling server stays small; get it wrong and you download about 3 GB of CUDA libraries you never use.

Verified on Docling 2.148.0Updated 6 Nov 2026Includes our own measurements6 min read
In short
  • Python 3.10–3.14 in a virtual environment; no system packages are needed for the default install.
  • No GPU: install PyTorch from the CPU index first, then pip install docling.
  • NVIDIA GPU: match the PyTorch CUDA build to the version nvidia-smi reports (cu132 or cu134 for torch 2.15.0; cu130 or cu126 give torch 2.14.1).
  • Optional system tools: tesseract-ocr, libreoffice (for .doc/.ppt/.xls/.rtf), ffmpeg (audio/video).
bash
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 --version

This 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.

PyTorch download size on LinuxCompressed wheels pulled for torch 2.15.0 on Linux x86_64, Python 3.13. Docling needs PyTorch for its layout, table and OCR models.
0.01.02.03.0CPU build (download.pytorch.org/whl/cpu)0.21 GBDefault PyPI build (CUDA 13 dependencies)2.98 GB

File sizes read from PyPI and download.pytorch.org metadata by docling.org on 6 Nov 2026.

Show data table
PyTorch download size on Linux
GB
CPU build (download.pytorch.org/whl/cpu)0.21 GB
Default PyPI build (CUDA 13 dependencies)2.98 GB

With an NVIDIA GPU#

bash
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 cuda

The 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#

FeatureDebian / UbuntuFedora / RHEL
Tesseract OCR engineapt-get install tesseract-ocr tesseract-ocr-deudnf install tesseract tesseract-langpack-deu
tesserocr (C API) build depsapt-get install libtesseract-dev libleptonica-dev pkg-configdnf install tesseract-devel leptonica-devel
.doc / .ppt / .xls / .rtfapt-get install libreoffice-core libreoffice-writer libreoffice-calc libreoffice-impressdnf install libreoffice-core libreoffice-writer libreoffice-calc libreoffice-impress
Audio and videoapt-get install ffmpegdnf 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 download during provisioning so the first request is not slow.
  • Limit threads per process with --num-threads or OMP_NUM_THREADS when 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.

Sources