-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (32 loc) · 883 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
FROM ubuntu:18.04
RUN apt-get update -y \
&& apt-get install -y python3-pip python3-dev \
&& apt-get install -y wget \
&& apt-get install -y unzip \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade pip
RUN pip3 install flask flask_json
RUN pip3 install numpy
ENV LANG="C.UTF-8" \
LC_ALL="C.UTF-8"
RUN mkdir -p nlpnet
WORKDIR /nlpnet/
RUN wget https://github.com/erickrf/nlpnet/archive/refs/heads/master.zip
RUN unzip master
WORKDIR ./nlpnet-master
RUN chmod -R 777 ./*
RUN pip3 install .
WORKDIR /nlpnet/
RUN mkdir -p ./models/
WORKDIR ./models/
#Download models
RUN wget http://nilc.icmc.usp.br/nlpnet/data/pos-pt.tgz
RUN tar xvzf pos-pt.tgz
RUN wget http://nilc.icmc.usp.br/nlpnet/data/srl-pt.tgz
RUN tar xvzf srl-pt.tgz
EXPOSE 8866
#Download nltk
WORKDIR /nlpnet/
COPY ./ /nlpnet/
RUN python3 -m nltk.downloader punkt
CMD ["python3", "server.py"]