-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 lines (43 loc) · 1.88 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
FROM openjdk:8-jre
LABEL maintainer="Dominique Besagni <[email protected]>"
ARG TT_VERSION=3.2.2
ARG TERMSUITE_VERSION=3.0.10
ARG TT_URL=http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data
# Install applications and set rights
COPY TermSuiteWrapper.sh /usr/bin/TermSuiteWrapper.sh
COPY TermSuiteWrapper2.sh /usr/bin/TermSuiteWrapper2.sh
COPY TermSuiteJson2Tsv.pl /usr/bin/TermSuiteJson2Tsv.pl
COPY TermSuiteTsv2DocTerm.pl /usr/bin/TermSuiteTsv2DocTerm.pl
RUN chmod 0755 /usr/bin/TermSuiteWrapper.sh
RUN chmod 0755 /usr/bin/TermSuiteWrapper2.sh
RUN chmod 0755 /usr/bin/TermSuiteJson2Tsv.pl
RUN chmod 0755 /usr/bin/TermSuiteTsv2DocTerm.pl
## Install necessary tools and clean up
RUN apt-get update \
&& apt-get install -y cpanminus --no-install-recommends \
&& cpanm -q open \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean \
&& rm -fr /var/cache/apt/* /var/lib/apt/lists/* \
&& rm -fr ./cpanm /root/.cpanm /usr/src/* /tmp/*
WORKDIR /opt/treetagger/
RUN wget ${TT_URL}/tree-tagger-linux-${TT_VERSION}.tar.gz \
&& wget ${TT_URL}/tagger-scripts.tar.gz \
&& wget ${TT_URL}/english.par.gz \
&& wget ${TT_URL}/french.par.gz \
&& wget ${TT_URL}/german.par.gz \
&& wget ${TT_URL}/russian.par.gz \
&& wget ${TT_URL}/italian.par.gz \
&& wget ${TT_URL}/spanish.par.gz \
&& wget ${TT_URL}/install-tagger.sh \
&& /bin/sh /opt/treetagger/install-tagger.sh \
&& mv lib models \
&& chmod a+x /opt/treetagger/models \
&& rm -rf *.gz *.tgz cmd/ doc/
WORKDIR /opt/TermSuite/
RUN curl -O -L https://search.maven.org/remotecontent?filepath=fr/univ-nantes/termsuite/termsuite-core/${TERMSUITE_VERSION}/termsuite-core-${TERMSUITE_VERSION}.jar
ENV PATH /opt/TermSuite:${PATH}
# Set up working directory and default command
WORKDIR /tmp
RUN chmod 1777 /tmp
CMD ["/usr/bin/TermSuiteWrapper.sh", "-h"]