docling-project / docling-project/docling

Illegal Instruction error when running in container

Open
#2,041 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Bug
I have installed latest docling-serve (however I'm raising here as I think this is a docling question and I have isolated the issue using docking on the CLI to exclude the ui/API aspects) on a docker container (arm64, mbp m4 max, with docker running within Colima and container in unprivileged mode) and when I run a command on the container CLI I get the error Illegal Instruction and it exits. If I run docling-serve from a venv on macOS host it works fine (but I want it in a container, and I want it to use CPU not GPU as my GPU is flat out with Ollama work). I have tried with device type of CPU explicitly too.

Version info:

The verbose output is:
```
((app-root) ) bash-5.1$ docling --to md --device cpu 5.\ IOW.pdf -vv
2025-08-05 11:01:49,062 INFO docling.cli.main: paths: [PosixPath('/tmp/tmp7e4z_p5g/5. IOW.pdf')]
2025-08-05 11:01:49,062 INFO docling.datamodel.document: detected formats: []
2025-08-05 11:01:49,090 INFO docling.document_converter: Going to convert document batch...
2025-08-05 11:01:49,090 INFO docling.document_converter: Initializing pipeline for StandardPdfPipeline with options hash 8478bb6e19bfd7eb23fe7ad5810ab25a
2025-08-05 11:01:50,022 INFO docling.utils.accelerator_utils: Accelerator device: 'cpu'
2025-08-05 11:01:51,645 INFO docling.utils.accelerator_utils: Accelerator device: 'cpu'
2025-08-05 11:01:51,646 DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): huggingface.co:443
2025-08-05 11:01:51,946 DEBUG urllib3.connectionpool: https://huggingface.co:443 "GET /api/models/ds4sd/docling-layout-old/revision/main HTTP/1.1" 200 797
2025-08-05 11:01:52,237 DEBUG docling_ibm_models.layoutmodel.layout_predictor: LayoutPredictor settings: {'model_name': 'RTDetrForObjectDetection', 'safe_tensors_file': '/opt/app-root/src/.cache/huggingface/hub/models--ds4sd--docling-layout-old/snapshots/b5b4bd59ad2b69aab715e9b1f1dfd74394c45fd4/model.safetensors', 'device': 'cpu', 'num_threads': 4, 'image_size': {'height': 640, 'width': 640}, 'threshold': 0.3}
2025-08-05 11:01:52,765 DEBUG urllib3.connectionpool: https://huggingface.co:443 "GET /api/models/ds4sd/docling-models/revision/v2.2.0 HTTP/1.1" 200 1266
2025-08-05 11:01:52,795 INFO docling.utils.accelerator_utils: Accelerator device: 'cpu'
2025-08-05 11:01:52,964 INFO docling.models.factories.base_factory: Loading plugin 'docling_defaults'
2025-08-05 11:01:52,965 INFO docling.models.factories: Registered picture descriptions: ['vlm', 'api']
2025-08-05 11:01:52,965 INFO docling.pipeline.base_pipeline: Processing document 5. IOW.pdf
Illegal instruction
```

...

### Steps to reproduce
Run any analysis of a file in a container (maybe Colima specific) in same environment
...

### Docling version
```
Docling version: 2.43.0
Docling Core version: 2.44.1
Docling IBM Models version: 3.9.0
Docling Parse version: 4.1.0
Python: cpython-312 (3.12.11)
Platform: Linux-6.8.0-50-generic-aarch64-with-glibc2.34
```
...

### Python version
Python 3.12.11
...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.