-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_server
32 lines (28 loc) · 1.49 KB
/
Dockerfile_server
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
FROM python:3.8-slim
LABEL maintainer "Kyrylo Malakhov <[email protected]> and Vitalii Velychko <[email protected]> and Oleksandr Shchurov <[email protected]>"
LABEL description "Server only. docsim - An NLU-Powered tool for knowledge discovery, classification, diagnostics and prediction."
COPY ./server /docsim/server
WORKDIR /docsim/server/
RUN apt-get -y clean \
&& apt-get -y update \
&& apt-get -y install nginx \
&& apt-get -y install python-dev \
&& apt-get -y install build-essential \
&& apt-get -y install unzip \
&& apt-get -y install bzip2 \
&& apt-get -y install wget \
&& apt-get -y install curl \
&& curl https://getmic.ro | bash \
# ------------------------------------------------------------------
&& pip install -r ./deploy/requirements.txt --src /usr/local/src \
# Download models
&& wget -O ./models/fiction.lowercased.lemmatized.word2vec.300d.bz2 https://lang.org.ua/static/downloads/models/fiction.lowercased.lemmatized.word2vec.300d.bz2 \
&& bzip2 -d ./models/fiction.lowercased.lemmatized.word2vec.300d.bz2 \
&& wget -O ./models/ubercorpus.lowercased.lemmatized.word2vec.300d.bz2 https://lang.org.ua/static/downloads/models/ubercorpus.lowercased.lemmatized.word2vec.300d.bz2 \
&& bzip2 -d ./models/ubercorpus.lowercased.lemmatized.word2vec.300d.bz2 \
&& rm -r /root/.cache \
&& apt-get -y clean \
&& apt-get -y autoremove \
&& cp ./deploy/nginx.conf /etc/nginx
RUN chmod +x ./start.sh
CMD ["./start.sh"]