-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
116 lines (106 loc) · 2.84 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONUNBUFFERED 1
ENV PYTHONIOENCODING utf8
RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
curl \
git \
openssh-client \
software-properties-common \
libldap2-dev \
libsasl2-dev \
&& rm -rf /var/lib/apt/lists/*
# Install OS dependencies
RUN set -ex \
&& add-apt-repository multiverse \
&& add-apt-repository universe \
&& add-apt-repository "ppa:deadsnakes/ppa" \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
python3.6 \
python3.6-dev \
libpython3-dev \
python3-pip \
python3.6-venv \
python3-setuptools \
ffmpeg \
libavcodec-extra58 \
libavformat58 \
libavutil56 \
imagemagick \
libevent-dev \
libjansson4 \
libxml2-utils \
md5deep \
rsync \
tree \
uuid \
supervisor \
flex \
sqlite3 \
uwsgi \
uwsgi-plugin-python3 \
libtiff5-dev \
libjpeg8-dev \
zlib1g-dev \
libmysqlcppconn-dev \
libfreetype6-dev \
liblcms2-dev \
libreadline-dev \
libreadline6-dev \
libwebp-dev \
tcl8.6-dev \
tk8.6-dev \
python-tk \
libmysqlclient-dev \
mysql-client \
libmagic-dev \
tesseract-ocr \
libssl-dev \
autoconf \
automake \
libtool \
gfortran \
autoconf-archive \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Install foma (FST)
RUN set -ex \
&& curl -L https://bitbucket.org/mhulden/foma/downloads/foma-0.9.18.tar.gz --output foma-0.9.18.tar.gz \
&& tar -xvzf foma-0.9.18.tar.gz \
&& cd foma-0.9.18 \
&& make \
&& make install \
&& cd .. \
&& rm -r foma-0.9.18*
# Install Tgrep2 (PS tree search)
RUN set -ex \
&& git clone https://github.com/dativebase/tgrep2.git \
&& cd tgrep2 \
&& make install \
&& cd ..
# Install MITLM (LMs)
RUN set -ex \
&& git clone https://github.com/mitlm/mitlm.git \
&& cd mitlm \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install \
&& rm /usr/local/bin/estimate-ngram \
&& ln -s /mitlm/estimate-ngram /usr/local/bin/estimate-ngram
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN python3.6 -m venv /venv
RUN /venv/bin/pip install --upgrade pip
RUN /venv/bin/pip install wheel
COPY . /usr/src/old
ENV PYTHONPATH=/usr/src/old
RUN /venv/bin/pip install -r /usr/src/old/requirements/test.txt
RUN cd /venv/lib/python3.6/site-packages && /venv/bin/python /usr/src/old/setup.py develop
WORKDIR /usr/src/old/
CMD ["/venv/bin/pserve", "--reload", "config.ini", "http_port=8000", "http_host=0.0.0.0"]