Skip to content

easy ocr does not work in docker deployment #1398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dghoffra opened this issue Apr 14, 2025 · 3 comments
Open

easy ocr does not work in docker deployment #1398

dghoffra opened this issue Apr 14, 2025 · 3 comments

Comments

@dghoffra
Copy link

Hi,

I am trying to deploy and use EasyOCR in a customized Docker container. When I run my PNG in the Docker container, the OCR only recognizes various empty strings like '', '', etc. Locally on my Mac M1, it works perfectly! I have already checked the library dependencies and am slowly getting desperate - does anyone have an idea which library could be causing this?

@tyshchenko-dev
Copy link

Hi, I have the same problem. I was developing the project on macOS/Windows and everything worked well — it recognized characters very accurately. But when I tried to package it into Docker, EasyOCR started recognizing only a few words from an image full of text (I had tested it on macOS where it was able to extract a lot of text, but after setting it up in Docker, it recognized only a few words).

@tyshchenko-dev
Copy link

Hi,

I am trying to deploy and use EasyOCR in a customized Docker container. When I run my PNG in the Docker container, the OCR only recognizes various empty strings like '', '', etc. Locally on my Mac M1, it works perfectly! I have already checked the library dependencies and am slowly getting desperate - does anyone have an idea which library could be causing this?

It turns out that if you run the same Docker configuration on Windows, EasyOCR works perfectly. But if you run it on macOS, for some reason it only extracts a single line. I suspect that my Mac has limited resources, which aren’t enough for the container to run properly.

@KopachevskiiYuriy
Copy link

KopachevskiiYuriy commented Apr 23, 2025

I can also confirm the same problem on macOS with M1.
Sometimes only a few rows are returned. And sometimes some trash like "L=LELELELELELELEEIEIE=I GLELELELELELE" (see attachments)

image.jpeg

result.txt

I double checked:
-Python version and all dependencies
-Base docker image (tried different)
-Downloading language models in EasyOCR
-Resources allocated for the Docker container
-GPU & CPU-only modes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants