29 lines
571 B
Docker
29 lines
571 B
Docker
FROM python:3.7
|
|
|
|
|
|
RUN apt-get update \
|
|
&& apt-get -y install \
|
|
tesseract-ocr \
|
|
tesseract-ocr-jpn \
|
|
&& apt-get clean
|
|
|
|
WORKDIR /install
|
|
|
|
COPY ./api .
|
|
|
|
# get Polish language train data
|
|
# RUN wget -P /usr/share/tesseract-ocr/4.00/tessdata/ https://github.com/tesseract-ocr/tessdata/raw/4.00/pol.traineddata
|
|
|
|
RUN mv ./tesseract_data/pol.traineddata /usr/share/tesseract-ocr/4.00/tessdata/
|
|
|
|
RUN pip3 install pipenv_to_requirements gunicorn && \
|
|
pipenv run pipenv_to_requirements && \
|
|
pip3 install --no-cache -r requirements.txt
|
|
|
|
WORKDIR /install/api
|
|
|
|
|
|
|
|
|
|
|