Skip to content

Commit

Permalink
Actor: Refactor actor.sh and add docling_processor.py
Browse files Browse the repository at this point in the history
Refactor the `actor.sh` script to modularize functions for finding the Apify CLI, setting up a temporary environment, and cleaning it up. Introduce a new function, `get_actor_input()`, to handle input detection more robustly. Replace inline Python conversion logic with an external script, `docling_processor.py`, for processing documents via the docling-serve API.

Signed-off-by: Václav Vančura <[email protected]>
  • Loading branch information
vancura committed Mar 9, 2025
1 parent 103e0f1 commit 16bbed2
Show file tree
Hide file tree
Showing 3 changed files with 521 additions and 489 deletions.
1 change: 1 addition & 0 deletions .actor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ ENV EASYOCR_MODULE_PATH=/tmp/easyocr-models
COPY --chown=1000:1000 .actor/actor.sh .actor/actor.sh
COPY --chown=1000:1000 .actor/actor.json .actor/actor.json
COPY --chown=1000:1000 .actor/input_schema.json .actor/input_schema.json
COPY --chown=1000:1000 .actor/docling_processor.py .actor/docling_processor.py
RUN chmod +x .actor/actor.sh

# Copy the build files from builder
Expand Down
Loading

0 comments on commit 16bbed2

Please sign in to comment.