-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
189 lines (186 loc) · 11.3 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#FROM maven:3.2-jdk-7-onbuild
FROM ubuntu:14.04
MAINTAINER Mouhamadou Ba <[email protected]>
#
#
# general tools
RUN apt-get -yqq update && apt-get -yqq install \
maven \
git \
expect \
wget \
xmlstarlet \
zip \
# for the python-based tools
python \
python-numpy \
make \
ruby \
g++ \
gcc \
libboost-all-dev \
flex && \
# java
apt-get install -y software-properties-common && \
add-apt-repository ppa:webupd8team/java -y && \
apt-get update && \
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
apt-get install -y oracle-java8-installer && \
apt-get clean && \
rm -rf /var/lib/apt/lists*
ENV java_version oracle-java8
## pulling and installing alvisnlp
RUN git clone -b docker-sources https://github.com/Bibliome/alvisnlp.git /alvisnlp && \
cd /alvisnlp && \
# compiling and installing alvisnlp
mvn clean install && \
# install alvisnlp
./install.sh . && \
# remove maven dependencies
rm -rf ~/.m2 && \
# remove extras
rm -rf doc* alvisnlp-test test-alvisnlp.sh && \
# create the external soft dir
mkdir psoft
# external softs workdir
WORKDIR /alvisnlp/psoft
RUN rm -f /alvisnlp/share/default-param-values.xml && \
cp /alvisnlp/share/default-param-values.xml.template /alvisnlp/share/default-param-values.xml && \
## installing biolg
#wget http://staff.cs.utu.fi/~spyysalo/biolg/biolg-1.1.12.tar.gz && \
#mkdir biolg-1.1.12 && tar xvzf biolg-1.1.12.tar.gz -C biolg-1.1.12/ && \
#rm biolg-1.1.12.tar.gz && \
#cd biolg-1.1.12/pcre-5.0 && ./configure && cd ../.. && \
#cd biolg-1.1.12/expat-2.0.0 && ./configure && cd ../.. && \
#cd biolg-1.1.12 && make && cd ../ && \
## intalling ccgparser
wget http://www.cl.cam.ac.uk/%7Esc609/resources/candc-downloads/candc-linux-1.00.tgz && \
tar xvf candc-linux-1.00.tgz && \
rm candc-linux-1.00.tgz && \
# not required cd candc-1.00/ && make && cd /alvisnlp/psoft && \
## installing enjuparser /!\ download link does work
## installing enjuparser 2 /!\ download link does work
## install geniatagger
wget http://www.nactem.ac.uk/tsujii/GENIA/tagger/geniatagger-3.0.2.tar.gz && \
tar xvf geniatagger-3.0.2.tar.gz && \
rm geniatagger-3.0.2.tar.gz && \
cd geniatagger-3.0.2/ && make && cd /alvisnlp/psoft && \
## installing SPECIES
wget http://download.jensenlab.org/species_tagger.tar.gz && \
tar xvf species_tagger.tar.gz && \
rm species_tagger.tar.gz && \
cd species_tagger && make && cd /alvisnlp/psoft && \
## installing StanfordNER 2014-06-16*
wget https://nlp.stanford.edu/software/stanford-ner-2014-06-16.zip && \
unzip stanford-ner-2014-06-16.zip && \
rm stanford-ner-2014-06-16.zip && \
# not required cd stanford-ner-2014-06-16/ && /alvisnlp/psoft ../ && \
## installing tees
wget https://github.com/jbjorne/TEES/tarball/master && \
tar xvf master && \
rm -rf master && \
mv *-TEES-* tees && \
cd tees/ && \
# creating the expect file
wget https://raw.githubusercontent.com/openminted/alvis-docker/master/script.exp && \
chmod +x script.exp && \
./script.exp && \
export TEES_SETTINGS=$pwd/tees_local_settings.py && \
cd /alvisnlp/psoft && \
## installing treeTagger
wget http://www.cis.uni-muenchen.de/%7Eschmid/tools/TreeTagger/data/tree-tagger-linux-3.2.1.tar.gz && \
mkdir treetagger/ && tar xvf tree-tagger-linux-3.2.1.tar.gz -C treetagger && \
rm tree-tagger-linux-3.2.1.tar.gz && \
cd treetagger/ && cd /alvisnlp/psoft && \
mkdir treetagger/lib && \
cd treetagger/lib && \
wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/english-par-linux-3.2-utf8.bin.gz && \
gunzip -N english-par-linux-3.2-utf8.bin.gz && \
mv english-utf8.par english.par && \
cd /alvisnlp/psoft && \
## installing wapiti
wget https://wapiti.limsi.fr/wapiti-1.5.0.tar.gz && \
tar xvf wapiti-1.5.0.tar.gz && \
rm wapiti-1.5.0.tar.gz && \
cd wapiti-1.5.0 && make && make install && cd /alvisnlp/psoft && \
## installing yatea /!\ seems to require Q&A during installation
wget http://search.cpan.org/CPAN/authors/id/T/TH/THHAMON/Lingua-YaTeA-0.622.tar.gz && \
tar xvf Lingua-YaTeA-0.622.tar.gz && \
rm Lingua-YaTeA-0.622.tar.gz && \
cd Lingua-YaTeA-0.622 && \
cpan App::cpanminus && \
cpanm Lingua::YaTeA && \
cd /alvisnlp/psoft && \
## params values setting
cat /alvisnlp/share/default-param-values.xml | \
## xmi import
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.uima.XMIImport']/source" | \
## xmi export
xmlstarlet ed -u "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.uima.XMIExport']/outDir" -v . | \
xmlstarlet ed -u "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.uima.XMIExport']/typeSystemFile" -v typesystem.xml | \
## biolg ?not istalled
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.biolg.BioLG']/parserPath" | \
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.biolg.BioLG']/lp2lpExecutable" | \
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.biolg.BioLG']/lp2lpConf" | \
## enju parser
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.enju.EnjuParser']/enjuExecutable" | \
## enju parser 2
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.enju.EnjuParser2']/enjuExecutable" | \
## ccg parser params values setting
xmlstarlet ed -u "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.ccg.CCGParser']/executable" -v /alvisnlp/psoft/candc-1.00/bin/parser | \
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.ccg.CCGParser']/parserModel" | \
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.ccg.CCGParser']/superModel" | \
## ccg postagger params values setting
xmlstarlet ed -u "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.ccg.CCGPosTagger']/executable" -v /alvisnlp/psoft/candc-1.00/bin/pos | \
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.ccg.CCGPosTagger']/model" | \
## geniatagger params values setting
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.geniatagger.GeniaTagger']/geniaDir" -v /alvisnlp/psoft/geniatagger-3.0.2 | \
## species tagger param setting
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.Species']/speciesDir" -v /alvisnlp/psoft/species_tagger/ | \
## Ab3P param settings ?not istalled
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.ab3p.Ab3P']/installDir" | \
## ChemSpotA param settings ?not istalled
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.chemspot.ChemSpotA']/cRFModel" | \
xmlstarlet ed -d "//module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.chemspot.ChemSpotA']/dictionary" | \
## stanford param values setting
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.stanford.StanfordNER']/classifierFile" | \
## tees classify params values setting
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.tees.TEESClassify']/teesHome" -v /alvisnlp/psoft/tees/ | \
## tees train params values setting
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.tees.TEESTrain']/teesHome" -v /alvisnlp/psoft/tees/ | \
## wapiti label params values setting
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.wapiti.WapitiLabel']/wapitiExecutable" -v /usr/local/bin/wapiti | \
## wapiti train params values setting
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.wapiti.WapitiTrain']/wapitiExecutable" -v /usr/local/bin/wapiti | \
## treetagger
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.treetagger.TreeTagger']/treeTaggerExecutable" -v /alvisnlp/psoft/treetagger/bin/tree-tagger | \
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.treetagger.TreeTagger']/parFile" | \
## yatea params values setting
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.yatea.YateaExtractor']/yateaExecutable" -v /usr/local/bin/yatea | \
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.yatea.YateaExtractor']/rcFile" -v res://yatea.rc | \
#xmlstarlet ed -d /default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.yatea.YateaExtractor']/rcFile" | \
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.yatea.YateaExtractor']/configDir" | \
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.yatea.YateaExtractor']/localeDir" | \
## tomap params
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.tomap.TomapTrain']/yateaExecutable" -v /usr/local/bin/yatea | \
xmlstarlet ed -u "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.tomap.TomapTrain']/rcFile" -v res://yatea.rc | \
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.tomap.TomapTrain']/configDir" | \
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.tomap.TomapTrain']/localeDir" | \
## chemspot ?not istalled
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.chemspot.Chemspot']/chemspotDir" | \
## Word2Vec ?not istalled
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.contes.Word2Vec']/contesDir" | \
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.contes.Word2Vec']/workers" | \
## ContesTrain ?not istalled
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.contes.ContesTrain']/contesDir" | \
## ContesPredict ?not istalled
xmlstarlet ed -d "/default-param-values/module[@class='fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.modules.contes.ContesPredict']/contesDir" | \
tee /alvisnlp/share/default-param-values.xml
#
WORKDIR /alvisnlp
#
ENV PATH /alvisnlp/bin:$PATH
#
# ENTRYPOINT ["/alvisnlp/bin/alvisnlp"]
#
CMD ["alvisnlp"]