techiaith / docker-moses-smt

Hwyluso cyfieithu peirianyddol MosesSMT i'r Gymraeg // Making MosesSMT machine translation easier for Welsh (and other languages)
MIT License
16 stars 7 forks source link

Support training Moses in the docker container #9

Open Pike opened 7 years ago

Pike commented 7 years ago

It'd be great to be able to train the MT inside the docker container, and that should be possible with up-to-date docker now. I heard. @DewiBrynJones said so, at least :-)

DewiBrynJones commented 7 years ago

On the case. Stay tuned...

DewiBrynJones commented 7 years ago

@tornoz

DewiBrynJones commented 6 years ago

Latest commits on the 'dockerization' branch enables this.

To quickly verify your pull/clone, delete all Moses related containers and images. Then do:

 $ make

which builds the Dockerfile.

Then simply run to get a running container and a command prompt:

 $ make run
 root@798d82cad57a:~/moses-smt# python moses.py fetchcorpus -e Meddalwedd

This will fetch en-cy bitexts that techiaith in Bangor have prepared from the localizations of Firefox, WordPress, LibreOffice etc. from a URL hardcoded in the scripts. 'Meddalwedd'=Software

Then train.....

 root@798d82cad57a:~/moses-smt# python moses.py train -e Meddalwedd -n 8 -s en -t cy

and start a server...

 root@798d82cad57a:~/moses-smt# python moses.py start -e Meddalwedd -s en -t cy

Then in a browser on the same machine go to:

http://localhost:8008

A demo page should appear. Enter

"An error occurred while connecting to the server"

in the box on the left. You should get

"Digwyddodd gwall wrth geisio cysylltu i'r gweinydd"

in the box on the right.

Mapped volumes are required in order to train with your own bitext data. Coming next...