Skip to content

Commit

Permalink
Update for clearlinux
Browse files Browse the repository at this point in the history
  • Loading branch information
otiai10 committed Jul 26, 2024
1 parent a797b34 commit b0b6bc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/runtime
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ function test_docker_runtimes() {
fi
fi
echo "┌───────────── ${testcase}"
# q: Is following line correct?
# XXX: Since clearlinux docker image doesn't support ARM64 architecture, as of 2024-07-26a,
# we need to add `--platform linux/amd64` to the `docker build` command when we build it on macos M3 chip.
# if [ ${testcase} == "clearlinux" ]; then DOCKER_PLATFORM_ARG="--platform linux/amd64"; fi
if [ -n "${BUILD}" ]; then
echo "│ [Docker] Building image..."
docker build . ${NO_CACHE} -f ${runtime} -t gosseract/test:${testcase} ${QUIET} | sed "s/^/│ /"
Expand Down
6 changes: 5 additions & 1 deletion test/runtimes/clearlinux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ RUN swupd bundle-add \
# This part should be replaced by curl,
# which is installed by default.
RUN swupd bundle-add wget
ENV TESSDATA_PREFIX /usr/share/tessdata
RUN mkdir -p ${TESSDATA_PREFIX}
RUN wget \
-O eng.traineddata \
https://github.com/tesseract-ocr/tessdata/blob/main/eng.traineddata?raw=true \
&& mv eng.traineddata /usr/share/tessdata
&& mv eng.traineddata ${TESSDATA_PREFIX}/eng.traineddata
# }}}

ENV GOPATH /go

RUN mkdir -p ${GOPATH}/src/github.com/otiai10
ADD . ${GOPATH}/src/github.com/otiai10/gosseract
WORKDIR ${GOPATH}/src/github.com/otiai10/gosseract
Expand Down

0 comments on commit b0b6bc7

Please sign in to comment.