Skip to content

CPU only version? #1

Description

@zoobab

Hi,

I made a venv before doing a pip install docling_ocr, it installs fine, but when I want to import docling_ocr, I end up with a libcudnn error, which is relative to nvidia and GPUs (which I don't have on the machine):

$ python
Python 3.11.7 | packaged by conda-forge | (main, Dec 23 2023, 14:43:09) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import docling_ocr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/zoobab/mnt/tmp/dockling/venv/lib/python3.11/site-packages/docling_ocr/__init__.py", line 1, in <module>
    from .extractors import SmolDoclingExtractor, BaseExtractor
  File "/home/zoobab/mnt/tmp/dockling/venv/lib/python3.11/site-packages/docling_ocr/extractors.py", line 3, in <module>
    import torch
  File "/home/zoobab/mnt/tmp/dockling/venv/lib/python3.11/site-packages/torch/__init__.py", line 405, in <module>
    from torch._C import *  # noqa: F403
    ^^^^^^^^^^^^^^^^^^^^^^
ImportError: libcudnn.so.9: cannot open shared object file: No such file or directory
>>> 

Would there be a way to make a docling_ocr_cpu pip package only for CPUs? I had similar issues running LLMs with vLLM on CPUs instead of GPUs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions