tesseract-ocr not recognized by alpine docker container

我的梦境 提交于 2021-01-29 05:18:54

问题


I am trying to install tesseract-ocr to use within a docker container, but when I feed a request to my api, I still get an error saying "FileNotFoundError: [Errno 2] No such file or directory: 'tesseract': 'tesseract'"

I'm trying to maybe add tesseract to my ENV $Path variable in the Dockerfile, but I'm unable to locate where this tesseract package is even installed. Below I've added my Dockerfile, any help would be appreciated. Thanks!

FROM python:3.6-alpine
RUN apk add --update --no-cache tesseract-ocr
FROM pytorch/pytorch:1.4-cuda10.1-cudnn7-devel
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN pip install .
EXPOSE 5000
WORKDIR /usr/src/app/examples/classification
CMD ["flask", "run", "--host", "0.0.0.0"]

来源:https://stackoverflow.com/questions/62415915/tesseract-ocr-not-recognized-by-alpine-docker-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!