From b3af130306c39e6eda2e49d229690cbbe22cfb48 Mon Sep 17 00:00:00 2001 From: Christian Stefanescu Date: Thu, 21 Nov 2024 09:37:42 +0100 Subject: [PATCH] fix and update tesserocr installation --- Dockerfile | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4f4f69ed2..7a31859a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN echo "deb http://http.us.debian.org/debian stable non-free" >/etc/apt/source imagemagick-common imagemagick mdbtools djvulibre-bin \ libtiff5-dev libjpeg-dev libfreetype6-dev libwebp-dev \ libtiff-tools ghostscript librsvg2-bin jbig2dec \ - pst-utils \ + pst-utils libopenjp2-7-dev libgif-dev libpng-dev \ ### tesseract tesseract-ocr-eng \ tesseract-ocr-swa \ @@ -126,7 +126,7 @@ RUN mkdir /models/ && \ COPY requirements.txt /tmp/ #RUN pip3 install --no-cache-dir --prefer-binary --upgrade pip #RUN pip3 install --no-cache-dir --prefer-binary --upgrade setuptools wheel -RUN pip3 install --no-cache-dir -r /tmp/requirements.txt +RUN pip3 install --no-cache-dir --no-binary tesserocr -r /tmp/requirements.txt # Install spaCy models RUN python3 -m spacy download en_core_web_sm \ diff --git a/requirements.txt b/requirements.txt index 18f1c70bf..edb180734 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ languagecodes==1.1.1 countrytagger==0.1.2 pyicu==2.12 google-cloud-vision==3.7.2 -tesserocr==2.6.2 +tesserocr==2.7.1 spacy==3.6.1 numpy<2.0.0 # pinned because otherwise spacy requires an incompatible numpy fingerprints==1.1.1