Created
May 31, 2023 04:29
-
-
Save codesankalp/c4d8e18421bf112a70406241f6d91ee9 to your computer and use it in GitHub Desktop.
Dockerfile for building tesseract on amazon linux 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM docker.io/library/amazonlinux:latest | |
RUN yum -y update | |
RUN yum -y upgrade | |
RUN yum install clang -y && \ | |
yum install libpng-devel libtiff-devel zlib-devel libwebp-devel libjpeg-turbo-devel wget tar gzip -y && \ | |
wget https://github.com/DanBloomberg/leptonica/releases/download/1.75.1/leptonica-1.75.1.tar.gz && \ | |
tar -zxvf leptonica-1.75.1.tar.gz && \ | |
cd leptonica-1.75.1 && \ | |
./configure && \ | |
make && \ | |
make install | |
RUN cd ~ && \ | |
yum install git-core libtool pkgconfig -y && \ | |
git clone --depth 1 https://github.com/tesseract-ocr/tesseract.git tesseract-ocr && \ | |
cd tesseract-ocr && \ | |
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig && \ | |
./autogen.sh && \ | |
./configure && \ | |
make && \ | |
make install | |
RUN cd /usr/local/share/tessdata && \ | |
wget https://github.com/tesseract-ocr/tessdata/raw/main/osd.traineddata && \ | |
wget https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata && \ | |
wget https://github.com/tesseract-ocr/tessdata/raw/main/hin.traineddata | |
ENV TESSDATA_PREFIX=/usr/local/share/tessdata |
Author
codesankalp
commented
May 31, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment