-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 1.04 KB
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
29
30
31
32
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:alex-p/tesseract-ocr-devel
RUN apt-get update && apt-get install -y tesseract-ocr && apt-get install -y libtesseract-dev
RUN apt-get install -y libgl1-mesa-glx
RUN apt-get install -y wget
RUN wget -P /usr/share/tesseract-ocr/4.00/tessdata/ https://github.com/tesseract-ocr/tessdata/raw/master/fra.traineddata
RUN wget -P /usr/share/tesseract-ocr/4.00/tessdata/ https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata
RUN apt-get install -y python3-pip
RUN apt-get install -y poppler-utils
COPY dyslexia /deploy/dyslexia
COPY tests /deploy/tests
COPY requirements.txt /deploy/
COPY setup.py /deploy/
COPY app.py /deploy/
WORKDIR /deploy/
RUN python3 -m pip install --upgrade pip --no-cache-dir
RUN python3 -m pip install . --no-cache-dir
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV TESSDATA_PREFIX=/usr/share/tesseract-ocr/4.00/tessdata/
RUN tesseract --version
CMD python3 -m uvicorn app:app --host 0.0.0.0 --port $PORT --workers 1