Conversation
…lative import from .main
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR restructures the docling package by moving it from a standalone service to a proper uv workspace package and improving the API integration. The changes simplify deployment while maintaining functionality for PDF-to-text conversion using docling.
- Restructured
doclingfromsrc/ocr/doclingto a proper uv package inpackages/ocr/docling - Updated API router to use async HTTP client and simplified environment handling
- Improved Docker configuration with dependency caching and updated volume mounting
Reviewed Changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ocr/docling/requirements.txt | Removed old requirements file as dependencies moved to pyproject.toml |
| src/ocr/docling/README.md | Removed old README in favor of new package documentation |
| src/ocr/docling/Dockerfile | Removed old Dockerfile replaced by new package-based version |
| src/api/app/routers/docling.py | Updated to use async HTTP client and simplified environment handling |
| pyproject.toml | Added docling optional dependency and workspace source configuration |
| packages/ocr/docling/src/pyonb_docling/api.py | Cleaned up import handling removing Docker-specific workarounds |
| packages/ocr/docling/pyproject.toml | New package configuration with proper dependencies |
| packages/ocr/docling/README.md | New documentation for using the restructured package |
| packages/ocr/docling/Dockerfile | New optimized Dockerfile with dependency caching |
| docker-compose.yml | Updated service configuration for new package structure |
| README.md | Updated installation instructions and project description |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/ocr/docling/Dockerfile
Outdated
| ENV PYTHONUNBUFFERED=1 | ||
|
|
||
| COPY ./pyproject.toml . | ||
| COPY ./README . |
There was a problem hiding this comment.
The COPY command copies './README' but the actual file is 'README.md'. This will cause the Docker build to fail.
Suggested change
| COPY ./README . | |
| COPY ./README.md . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following on from #38, restructure
pyonb:src/ocr/doclingauvpackage inpackages/ocr/doclingdoclingDockerfile to cache dependenciesDATA_FOLDERfor mounting thedoclingandocr-forwarding-apidata volumespyonband running inference withdoclingtest_inference_single_file_upload_doclingandtest_inference_on_folder_doclingboth pass