Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the installation of docling by GPU. #809

Open
rhatdan opened this issue Jan 25, 2025 · 5 comments
Open

Allow the installation of docling by GPU. #809

rhatdan opened this issue Jan 25, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@rhatdan
Copy link

rhatdan commented Jan 25, 2025

Requested feature

With RamaLama we are attempting to add RAG support using Docling in the PRAGmatic project. RamaLama is using contianer images and installing docling is jumping the size of the install from 1GB to 7 GB.

RamaLama differentiates container images based on GPU type. Would like to have a CPU, Rocm, and Cuda install.

pytorch supports installing with only CPU, ROCM or Cuda, but when I install docling on top, it insists on installing the full pytorch suite, blowing up the size.

Alternatives

...

@rhatdan rhatdan added the enhancement New feature or request label Jan 25, 2025
@PeterStaar-IBM
Copy link
Contributor

@rhatdan Is there a way we can replicate this issue. It looks a bit out of the ordinary that the size of the install goes from 1GB to 7 GB.

@rhatdan
Copy link
Author

rhatdan commented Jan 27, 2025

cat > /tmp/Containerfile
from quay.io/ramalama/ramalama
run pip install docling
podman build -t mydocling /tmp

@rhatdan
Copy link
Author

rhatdan commented Jan 27, 2025

Then compare the container image you built to the quay.io/ramalama/ramalama

@rhatdan
Copy link
Author

rhatdan commented Jan 27, 2025

pip install docling --extra-index-url https://download.pytorch.org/whl/cpu

Helps with the non-cpu case.

Would like to use similar for cuda and rocm installs.

@dolfim-ibm
Copy link
Contributor

It is true that the pypi version of pytorch is very big on linux (it installs tons of nvidia packages).

The Docling package doesn't have a requirement on which pytorch registry is used, but it will depend on pytorch being available.

Did you already try installing the Cuda version with the registry indexes suggested at https://pytorch.org/?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants