Brent Salisbury 3824aa6b2f Add poetry install shell cmd to the readme (#7)
* Add poetry install shell cmd to the readme

Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>

* Add GPU support instructions

- Validated on an EC2 GPU instance to work.
- Closes #8

Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>

* Update README.md

Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>

---------

Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
Co-authored-by: Anil Vishnoi <vishnoianil@gmail.com>
2024-10-11 08:41:50 +02:00
2024-09-06 22:05:58 +02:00
2024-09-06 22:05:58 +02:00
2024-09-06 22:05:58 +02:00
2024-09-06 22:05:58 +02:00
2024-09-06 22:05:58 +02:00
2024-09-06 22:05:58 +02:00

Docling Serve

Running Docling as an API service.

Note

This is an unstable draft implementation which will quickly evolve.

Development

Install the dependencies

# Install poetry if not already available
curl -sSL https://install.python-poetry.org | python3 -

# Install dependencies
poetry install

# Run the server
poetry run uvicorn docling_serve.app:app --reload

Example payload (http source):

curl -X 'POST' \
  'http://127.0.0.1:8000/convert' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "http_source": {
    "url": "https://arxiv.org/pdf/2206.01062"
  }
}'

Cuda GPU Support

For GPU support try the following:

# Create a virtual env
python3 -m venv venv

# Activate the venv
source venv/bin/active

# Install torch with the special index
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

# Install the package
pip install -e .

# Run the server
poetry run uvicorn docling_serve.app:app --reload
Description
No description provided
Readme MIT 44 MiB
Languages
Python 94.6%
Makefile 3.9%
Dockerfile 1.5%