-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
129 lines (108 loc) · 3.17 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
117
118
119
120
121
122
123
124
125
126
127
128
129
FROM ubuntu:16.04
MAINTAINER Michał Marcińczuk <[email protected]>
RUN apt-get update && apt-get -y upgrade
# Set the locale
RUN apt-get update && apt-get install locales
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y openjdk-8-jdk netcat unzip && \
apt-get clean;
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
RUN apt-get update && \
apt-get -y install git libboost-all-dev libicu-dev git-core wget \
cmake libantlr-dev libloki-dev python-dev swig libxml2-dev \
libsigc++-2.0-dev libglibmm-2.4-dev libxml++2.6-dev p7zip-full \
autoconf
WORKDIR /liner2
COPY ./g419-corpus /liner2/g419-corpus
COPY ./g419-lib-cli /liner2/g419-lib-cli
COPY ./g419-liner2-cli /liner2/g419-liner2-cli
COPY ./g419-liner2-core /liner2/g419-liner2-core
COPY ./g419-liner2-daemon /liner2/g419-liner2-daemon
COPY ./g419-external-dependencies /liner2/g419-external-dependencies
COPY ./g419-toolbox /liner2/g419-toolbox
COPY ./lib /liner2/lib
COPY ./gradle /liner2/gradle
COPY ./gradlew /liner2/
COPY ./build.gradle /liner2/
COPY ./settings.gradle /liner2/
COPY liner2-daemon /liner2/
COPY ./docker/liner2/liner2-daemon-run.sh /liner2/
COPY log4j.properties /liner2/
RUN /liner2/gradlew :g419-liner2-daemon:jar --no-daemon
WORKDIR /liner2/g419-external-dependencies
RUN tar -xvf CRF++-0.57.tar.gz
WORKDIR /liner2/g419-external-dependencies/CRF++-0.57
RUN ./configure
RUN make
RUN make install
RUN ldconfig
WORKDIR /build
RUN git clone http://nlp.pwr.edu.pl/corpus2.git
RUN git clone http://nlp.pwr.edu.pl/toki.git
RUN git clone http://nlp.pwr.edu.pl/maca.git
RUN git clone http://nlp.pwr.edu.pl/wccl.git
RUN git clone http://nlp.pwr.edu.pl/wcrft2.git
#### ... and building them
# corpus2
RUN cd corpus2
RUN mkdir bin
WORKDIR /build/corpus2/bin
RUN cmake ..
RUN make -j
RUN make -j
RUN make install
RUN ldconfig
# toki
RUN mkdir /build/toki/bin
WORKDIR /build/toki/bin
RUN cmake ..
RUN make -j
RUN make -j
RUN make install
RUN ldconfig
# morfeusz
RUN mkdir /build/morfeusz
WORKDIR /build/morfeusz
RUN wget http://download.sgjp.pl/morfeusz/older/morfeusz1/morfeusz-SGJP-linux64-20130413.tar.bz2
RUN tar -jxvf morfeusz-SGJP-linux64-20130413.tar.bz2
RUN mv libmorfeusz* /usr/local/lib/
RUN mv morfeusz /usr/local/bin/
RUN mv morfeusz.h /usr/local/include/
RUN ldconfig
# maca
RUN mkdir /build/maca/bin
WORKDIR /build/maca/bin
RUN cmake ..
RUN make -j
RUN make -j
RUN make install
RUN ldconfig
# wccl
RUN mkdir /build/wccl/bin
WORKDIR /build/wccl/bin
RUN cmake ..
RUN make -j
RUN make -j
RUN make install
RUN ldconfig
# wcrft2
RUN mkdir /build/wcrft2/bin
WORKDIR /build/wcrft2/bin
RUN cmake ..
RUN make -j
RUN make -j
RUN make install
RUN ldconfig
WORKDIR /liner2
RUN wget -O liner26_model_ner_nkjp.zip https://clarin-pl.eu/dspace/bitstream/handle/11321/598/liner26_model_ner_nkjp.zip
RUN unzip liner26_model_ner_nkjp.zip
COPY ./pipe_ner /liner2/
RUN wget -O timex_model_full.tar.gz https://clarin-pl.eu/dspace/bitstream/handle/11321/697/timex_model_full.tar.gz
RUN tar xvzf timex_model_full.tar.gz
COPY ./model.bin /liner2/timex_model_full/4class_timex3_cfg/model.bin
COPY ./pipe_timex /liner2/
COPY ./pipe_timex_ccl /liner2/