forked from desafinadude/dexi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (43 loc) · 968 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Pull base image
FROM python:3.7-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV DEBIAN_FRONTEND noninteractive
RUN pip install --upgrade pip
RUN apt update -y && \
apt install -y build-essential \
postgresql \
bash \
# Tessaract
tesseract-ocr \
libtesseract-dev \
# Poppler
cmake \
poppler-utils \
libpoppler-dev \
libpoppler-cpp-dev \
# Pillow Dependencies
libfreetype-dev \
libfribidi-dev \
libharfbuzz-dev \
libjpeg-dev \
liblcms2-dev \
libimagequant-dev \
# openjpeg-dev \
tcl-dev \
libtiff-dev \
tk-dev \
libghc-zlib-dev \
nano
RUN mkdir /app
COPY ./app /app
WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
RUN python -m spacy download en_core_web_sm
EXPOSE 5000
COPY ./entrypoint /app/entrypoint
RUN sed -i 's/\r//' /app/entrypoint
RUN chmod +x /app/entrypoint
ENTRYPOINT ["/app/entrypoint"]