-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (51 loc) · 1.29 KB
/
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
52
53
54
55
56
57
58
59
FROM ubuntu:18.04
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY uwsgi.ini /usr/src/app/
COPY nginx.conf /usr/src/app/
COPY requirements.txt /usr/src/app/
COPY start.sh /usr/src/app/
RUN apt-get -y update
RUN apt-get install -y software-properties-common
RUN apt-get install -y --fix-missing \
nginx \
redis-server \
build-essential \
cmake \
libtesseract-dev \
libleptonica-dev \
tesseract-ocr \
gfortran \
git \
wget \
curl \
graphicsmagick \
libgraphicsmagick1-dev \
libatlas-base-dev \
libavcodec-dev \
libavformat-dev \
libgtk2.0-dev \
libjpeg-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
python3-dev \
python3-numpy \
python3-setuptools \
software-properties-common \
zip \
&& apt-get clean && rm -rf /tmp/* /var/tmp/*
RUN cd ~ && \
mkdir -p dlib && \
git clone -b 'v19.9' --single-branch https://github.com/davisking/dlib.git dlib/ && \
cd dlib/ && \
python3 setup.py install --yes USE_AVX_INSTRUCTIONS
RUN apt-get -y install python3-pip
RUN pip3 install -r requirements.txt --upgrade
RUN pip3 install "connexion[swagger-ui]"
RUN python3 -m nerd -d en_core_web_sm
COPY . /usr/src/app
EXPOSE 5000
COPY nginx.conf /etc/nginx
RUN chmod +x ./start.sh
CMD ["./start.sh"]