-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (31 loc) · 1.44 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
FROM continuumio/miniconda3:4.10.3p1
# install build deps
RUN apt update && apt install -y git gcc g++ libgoogle-perftools-dev libsparsehash-dev wget vim subversion automake libtool zlib1g-dev libbz2-dev liblzma-dev python-dev graphviz imagemagick make cmake autoconf doxygen libboost-all-dev libxmlrpc-c++8-dev libxmlrpc-c++8v5 libxmlrpc-core-c3 libxmlrpc-core-c3-dev xmlrpc-api-utils
RUN git clone https://github.com/artetxem/monoses.git
WORKDIR /monoses
RUN ./get-third-party.sh
WORKDIR /monoses/third-party/fast_align/build
RUN cmake .. && make -j4
WORKDIR /monoses/third-party/phrase2vec/
RUN make -j4
WORKDIR /monoses/third-party/
RUN git clone https://github.com/zvelo/cmph.git
WORKDIR /monoses/third-party/cmph
RUN ./configure && make -j4 && make install
WORKDIR /monoses/third-party/
RUN git clone https://github.com/moses-smt/salm.git
WORKDIR /monoses/third-party/salm/Distribution/Linux
RUN make -j4
WORKDIR /monoses/third-party/moses/contrib/sigtest-filter/
RUN make SALMDIR=/monoses/third-party/salm -j4
WORKDIR /monoses/third-party/moses/
RUN ./bjam -j4 --with-cmph=/usr/local/lib --with-xmlrpc-c=/usr/
WORKDIR /monoses
RUN conda install pytorch torchvision cpuonly -c pytorch
ENV FLASK_APP=monoses
EXPOSE 5000
COPY Pipfile .
COPY Pipfile.lock .
RUN pip install --upgrade pip && pip install pipenv && pipenv install
COPY . .
CMD ["pipenv", "run", "gunicorn", "--bind", "0.0.0.0:5000", "--log-level=info", "--timeout", "120", "apiserver:app"]