Skip to content

Commit

Permalink
dowload tesseract data during docker build (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tentacule authored Oct 2, 2023
1 parent 8623f79 commit cceb247
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS builder

ARG LANGUAGE=eng

RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install \
Expand All @@ -10,9 +12,11 @@ RUN apt-get -y update && \
libtesseract4 \
make \
pkg-config \
libc6-dev
wget \
libc6-dev && \
mkdir tessdata && \
wget https://github.com/tesseract-ocr/tessdata/raw/main/${LANGUAGE}.traineddata -O ./tessdata/eng.traineddata

ARG LANGUAGE=eng
COPY ./tessdata/${LANGUAGE}.traineddata /tessdata/
COPY ./src /src

Expand All @@ -31,9 +35,5 @@ COPY --from=builder /src/PgsToSrt/out .
COPY --from=builder /tessdata /tessdata
COPY ./src/entrypoint.sh /entrypoint.sh

RUN apt-get -y update && \
apt-get -y install \
libtesseract4

# Docker for Windows: EOL must be LF.
ENTRYPOINT /entrypoint.sh

0 comments on commit cceb247

Please sign in to comment.