-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4adae77
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#use Ubuntu as the base image | ||
FROM ubuntu:22.04 | ||
|
||
# Set environment variables | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Update and install dependencies | ||
RUN apt update && apt install -y \ | ||
git autoconf automake libtool pkg-config \ | ||
libpng-dev libjpeg8-dev libtiff5-dev zlib1g-dev \ | ||
libwebp-dev libopenjp2-7-dev libgif-dev \ | ||
libarchive-dev libcurl4-openssl-dev libcu-dev \ | ||
libpango1.0-dev libcairo2-dev libleptonica-dev \ | ||
wget python3-pip vim && \ | ||
apt clean | ||
|
||
# Clone and build Tesseract | ||
RUN git clone https://github.com/tesseract-ocr/tesseract.git && \ | ||
cd tesseract && \ | ||
./autogen.sh && \ | ||
./configure && \ | ||
make && make install && ldconfig && \ | ||
make training && make training-install | ||
|
||
# clone tesstrain | ||
RUN git clone https://github.com/tesseract-ocr/tesstrain.git /tesseract/tesstrain | ||
|
||
# set the working directory | ||
WORKDIR /tesseract/tesstrain | ||
|
||
# install python requirements | ||
RUN pip3 install -r requirements.txt | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: "3.9" | ||
|
||
services: | ||
tesseract_trainer: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
volumes: | ||
- ./local_share:/Docker_Share | ||
tty: true |