-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (22 loc) · 913 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM python:3.7
# Tesseract
RUN apt-get update \
&& apt-get install tesseract-ocr -y \
python3-pip \
wget \
&& pip3 install --no-cache-dir pipenv \
&& mkdir /usr/local/share/tessdata \
&& wget 'https://github.com/tesseract-ocr/tessdata_best/blob/master/ces.traineddata?raw=true' -O ces.traineddata \
&& wget 'https://github.com/tesseract-ocr/tessdata_best/blob/master/slk.traineddata?raw=true' -O slk.traineddata \
&& wget 'https://github.com/tesseract-ocr/tessdata_best/blob/master/eng.traineddata?raw=true' -O eng.traineddata \
&& mv *.traineddata /usr/local/share/tessdata/
ENV TESSDATA_PREFIX=/usr/local/share/tessdata
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ADD Pipfile Pipfile.lock /pylunch/
WORKDIR /pylunch
RUN /bin/bash -c "pip3 install --no-cache-dir -r <(pipenv lock -r)"
ADD . /pylunch
RUN pip3 install --no-cache-dir /pylunch
EXPOSE 8000
CMD ["./run_flask.sh"]