-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
49 lines (42 loc) · 1.12 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
FROM alpine:3.8
LABEL maintainer="Moriaki Saigusa <[email protected]>"
# Essentials
# - bash: NEologd requires it.
# - curl: NEologd requires it.
# - swig: mecab-python3 requires it.
# - openssl: NEologd requires it.
RUN apk --no-cache add \
python3 \
python3-dev \
build-base \
git \
bash \
curl \
swig \
openssl \
tzdata \
&& cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
&& pip3 install --upgrade pip \
&& rm -rf /var/lib/apt/lists/*
# MeCab
RUN git clone https://github.com/taku910/mecab.git /mecab
WORKDIR /mecab/mecab
RUN ./configure --enable-utf8-only \
&& make \
&& make check \
&& make install
# IPADIC
WORKDIR /mecab/mecab-ipadic
RUN ./configure --with-charset=utf8 \
&& make \
&& make install
# NEologd
WORKDIR /mecab-ipadic-neologd
RUN git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git .
RUN ./bin/install-mecab-ipadic-neologd -n -y
# Flask Project
WORKDIR /mecablr
COPY ./app/ /mecablr/
RUN pip3 install -r requirements.txt
# Start
CMD [ "gunicorn", "wsgi:app", "--bind", "0.0.0.0:5000" ]