|
| 1 | +FROM perl:5.20 |
| 2 | + |
| 3 | +# graphviz ... AI::DecisionTree dependency |
| 4 | +# default-jre ... MSTperl parser is in Java |
| 5 | +RUN apt-get update && apt-get install -y \ |
| 6 | + graphviz \ |
| 7 | + default-jre \ |
| 8 | + libboost-all-dev \ |
| 9 | + cmake |
| 10 | + |
| 11 | +# Modules, that are needed to run treex -h (and the Hello world |
| 12 | +RUN cpanm \ |
| 13 | + YAML/Tiny.pm \ |
| 14 | + XML::LibXML \ |
| 15 | + Moose \ |
| 16 | + MooseX \ |
| 17 | + MooseX::NonMoose \ |
| 18 | + MooseX::Getopt \ |
| 19 | + MooseX::Role::Parameterized \ |
| 20 | + MooseX::Role::AttributeOverride \ |
| 21 | + MooseX::SemiAffordanceAccessor \ |
| 22 | + Readonly \ |
| 23 | + File::HomeDir \ |
| 24 | + File::ShareDir \ |
| 25 | + File::Slurp \ |
| 26 | + File::chdir \ |
| 27 | + YAML \ |
| 28 | + LWP::Simple \ |
| 29 | + String::Util \ |
| 30 | + PerlIO::gzip \ |
| 31 | + Class::Std |
| 32 | + |
| 33 | +# The PerlIO:Util has bug in its tests |
| 34 | +RUN cpanm -n PerlIO::Util |
| 35 | +RUN cpanm PerlIO::via::gzip |
| 36 | + |
| 37 | +# Other, "optional" Treex dependencies |
| 38 | +RUN cpanm \ |
| 39 | + autodie \ |
| 40 | + threads \ |
| 41 | + threads::shared \ |
| 42 | + forks \ |
| 43 | + namespace::autoclean \ |
| 44 | + Module::Reload \ |
| 45 | + IO::Interactive \ |
| 46 | + App::whichpm \ |
| 47 | + Treex::PML \ |
| 48 | + Cache::Memcached \ |
| 49 | + List::Pairwise \ |
| 50 | + Algorithm::NaiveBayes \ |
| 51 | + AI::DecisionTree \ |
| 52 | + Algorithm \ |
| 53 | + Algorithm::DecisionTree \ |
| 54 | + AnyEvent \ |
| 55 | + AnyEvent::Fork \ |
| 56 | + Bash::Completion::Utils \ |
| 57 | + Carp \ |
| 58 | + Carp::Always \ |
| 59 | + Carp::Assert \ |
| 60 | + Clone \ |
| 61 | + Compress::Zlib \ |
| 62 | + DBI \ |
| 63 | + DateTime \ |
| 64 | + EV \ |
| 65 | + Email::Find \ |
| 66 | + Encode::Arabic \ |
| 67 | + Frontier::Client \ |
| 68 | + Graph \ |
| 69 | + Graph::ChuLiuEdmonds \ |
| 70 | + Graph::MaxFlow \ |
| 71 | + HTML::FormatText \ |
| 72 | + JSON \ |
| 73 | + Lingua::EN::Tagger \ |
| 74 | + Modern::Perl \ |
| 75 | + MooseX::ClassAttribute \ |
| 76 | + MooseX::FollowPBP \ |
| 77 | + MooseX::Types::Moose \ |
| 78 | + PML \ |
| 79 | + POE \ |
| 80 | + String::Diff \ |
| 81 | + Test::Files \ |
| 82 | + Test::Output \ |
| 83 | + Text::Brew \ |
| 84 | + Text::JaroWinkler \ |
| 85 | + Text::Table \ |
| 86 | + Text::Unidecode \ |
| 87 | + Tk \ |
| 88 | + Tree::Trie \ |
| 89 | + URL::Encode \ |
| 90 | + XML::Simple |
| 91 | + |
| 92 | +# One of the subtests failed during image build |
| 93 | +RUN cpanm -n AI::MaxEntropy |
| 94 | + |
| 95 | +# Create root dir for treex checkout, share and tmp |
| 96 | +RUN mkdir ~/tectomt && cd ~/tectomt && git clone https://github.com/ufal/treex.git |
| 97 | + |
| 98 | +ENV TMT_ROOT=/root/tectomt |
| 99 | +ENV TREEX_ROOT="${TMT_ROOT}/treex" |
| 100 | +ENV PATH="${TREEX_ROOT}/bin:$PATH" |
| 101 | +ENV PERL5LIB="${TREEX_ROOT}/lib:$PERL5LIB" |
| 102 | +ENV PERLLIB=$PERL5LIB |
| 103 | + |
| 104 | +RUN mkdir -p /root/.treex/share/installed_tools |
| 105 | +RUN ln -s /root/.treex/share $TMT_ROOT/share |
| 106 | +RUN ln -s /tmp $TMT_ROOT/tmp |
| 107 | + |
| 108 | +# Some UFAL modules used by treex |
| 109 | +RUN cpanm Text::Iconv |
| 110 | +RUN cpanm Ufal::NameTag |
| 111 | +RUN cpanm Ufal::MorphoDiTa |
| 112 | +RUN cpanm Lingua::Interset |
| 113 | +RUN cpanm URI::Find |
| 114 | +RUN cpanm Cache::LRU |
| 115 | + |
| 116 | +# install Morce tagger |
| 117 | +RUN svn --username public --password public export https://svn.ms.mff.cuni.cz/svn/tectomt_devel/trunk/libs/packaged /tmp/packaged |
| 118 | +RUN cd /tmp/packaged/Morce-English && perl Build.PL && ./Build && ./Build install --prefix /usr/local/ |
| 119 | +# download models |
| 120 | +RUN mkdir -p /root/.treex/share/data/models/morce/en |
| 121 | +RUN cd tectomt/share/data/models/morce/en && wget http://ufallab.ms.mff.cuni.cz/tectomt/share/data/models/morce/en/morce.alph http://ufallab.ms.mff.cuni.cz/tectomt/share/data/models/morce/en/morce.dct http://ufallab.ms.mff.cuni.cz/tectomt/share/data/models/morce/en/morce.ft http://ufallab.ms.mff.cuni.cz/tectomt/share/data/models/morce/en/morce.ftrs http://ufallab.ms.mff.cuni.cz/tectomt/share/data/models/morce/en/tags_for_form-from_wsj.dat |
| 122 | + |
| 123 | +# install NADA |
| 124 | +RUN svn --username public --password public export https://svn.ms.mff.cuni.cz/svn/tectomt_devel/trunk/install/tool_installation /tmp/tool_installation |
| 125 | +RUN cd /tmp/tool_installation/NADA && perl Makefile.PL && make && make install |
| 126 | + |
| 127 | +# simple Hello world test |
| 128 | +RUN bash -c "echo 'Hello world' | treex -Len Read::Sentences Write::Sentences" |
0 commit comments