docling-project / docling-project/docling
Read-only file system accessed for writing by EasyOCR
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
### Question
I decided to post this question here first, because EasyOCR is the default OCR engine for docling. My setup is the following:
1. Docling running on VPC-scoped (air-gapped) AWS Lambda (arm64)
2. Models are pre-downloaded as per documentation and placed on the EFS fileshare
3. All other settings are more or less default.
I am getting an error:
```
[ERROR] OSError: [Errno 30] Read-only file system: '/home/sbx_user1051'
Traceback (most recent call last):
File "/var/task/app/lambda_function.py", line 61, in lambda_handler
doc = converter.convert(local_path).document
File "/opt/python/pydantic/_internal/_validate_call.py", line 39, in wrapper_function
return wrapper(*args, **kwargs)
File "/opt/python/pydantic/_internal/_validate_call.py", line 136, in __call__
res = self.__pydantic_validator__.validate_python(pydantic_core.ArgsKwargs(args, kwargs))
File "/opt/python/docling/document_converter.py", line 237, in convert
return next(all_res)
File "/opt/python/docling/document_converter.py", line 260, in convert_all
for conv_res in conv_res_iter:
File "/opt/python/docling/document_converter.py", line 295, in _convert
for item in map(
File "/opt/python/docling/document_converter.py", line 342, in _process_document
conv_res = self._execute_pipeline(in_doc, raises_on_error=raises_on_error)
File "/opt/python/docling/document_converter.py", line 363, in _execute_pipeline
pipeline = self._get_pipeline(in_doc.format)
File "/opt/python/docling/document_converter.py", line 325, in _get_pipeline
self.initialized_pipelines[cache_key] = pipeline_class(
File "/opt/python/docling/pipeline/standard_pdf_pipeline.py", line 66, in __init__
ocr_model = self.get_ocr_model(artifacts_path=artifacts_path)
File "/opt/python/docling/pipeline/standard_pdf_pipeline.py", line 154, in get_ocr_model
return factory.create_instance(
File "/opt/python/docling/models/factories/base_factory.py", line 57, in create_instance
return _cls(options=options, **kwargs)
File "/opt/python/docling/models/easyocr_model.py", line 81, in __init__
self.reader = easyocr.Reader(
File "/opt/python/easyocr/easyocr.py", line 65, in __init__
Path(self.user_network_directory).mkdir(parents=True, exist_ok=True)
File "/var/lang/lib/python3.13/pathlib/_local.py", line 726, in mkdir
self.parent.mkdir(parents=True, exist_ok=True)
File "/var/lang/lib/python3.13/pathlib/_local.py", line 726, in mkdir
self.parent.mkdir(parents=True, exist_ok=True)
File "/var/lang/lib/python3.13/pathlib/_local.py", line 722, in mkdir
os.mkdir(self, mode)
```
This is coming from EasyOCR, so this could or could not be deemed a bug by their team.. For my use-case, I ended up disabling OCR completely, as I don't process scanned documents that much. Is there another way to go around this issue?
Thanks in advance!
Contributor guide
Assessment
This issue has not been assessed yet.