docling-project / docling-project/docling

Issue: EasyOCR model cannot be accessed from Spark workers when using pre-downloaded docling model

Open
#1,414 5 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

Hi,

I'm building a distributed PDF parser on Databricks using Spark.
To avoid online model fetching at runtime, I pre-downloaded the docling models as described in [docling's documentation](https://docling-project.github.io/docling/usage/#model-prefetching-and-offline-usage), and placed them in a Databricks Volume.

With the use of a [pre-downloaded model](https://docling-project.github.io/docling/usage/#model-prefetching-and-offline-usage)

like this:

model_path = Path("/Volumes/dev/bronze/docling_model/")
output_directory = download_models(output_dir = model_path)

i'm trying to run docling in spark. Here is how I do it:

artifacts_path = "/Volumes/dev/bronze/docling_model/"

pipeline_options = PdfPipelineOptions(artifacts_path=artifacts_path)
converter = DocumentConverter(
format_options={
InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)
}
)

And still i get the following error when it's trying to load EasyOCR:

[Errno 30] Read-only file system: \\\'/.EasyOCR

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.