Docker Instructions

Hello,
I am confused with how to proceed with the lua docker image. I managed to get past an earlier issue with launching the image in a container. However, I am not sure what to run next. The FAQ says that I need to do a git to grab the latest code (http://opennmt.net/FAQ/#how-can-i-use-this-system-with-docker-on-ubuntu).

Am I suppose to build or make the project?

I have ran the scripts in the torch directory, but do I have to? How do I get from the docker ubuntu FAQ instructions:
http://opennmt.net/FAQ/#how-can-i-use-this-system-with-docker-on-ubuntu

… to actually running the preprocessing described in this link:
http://opennmt.net/Guide/#step-1-preprocess-data

th preprocess.lua -train_src data/src-train.txt -train_tgt data/tgt-train.txt -valid_src data/src-val.txt -valid_tgt data/tgt-val.txt -save_data data/demo

Is there a gap in the documentation???

preprocess.lua does not exist anywhere in the /root/torch directory. Either does train.lua. How do I get to this point? Do I actually have to build this from the git repository. I guess I don’t understand why I would use docker here. I thought it was more a self contained instance, kind of like just grabbing a VM and not having to mess around with installation.

Please advise on the next steps. Am I missing some documentation? Am I using docker for the wrong reasons?

Thanks,
Steve

Hi Steve,

You’ll need to git clone OpenNMT from their repo into your container. Because you’re spinning up the container and working interactively, you can just do that from the command line you have once you do your docker run command. Alternatively, you could set up your own Dockerfile that starts with:

FROM harvardnlp/opennmt:8.0
WORKDIR /
RUN git clone https://github.com/OpenNMT/OpenNMT
WORKDIR /OpenNMT
...
1 Like

Hi Dave,
THANK YOU!!!

I actually did a git and then exited the docker container and re-entered it without doing a git again, forgetting that I didn’t persist any changes to the docker image.

I ran the git command again and saw the missing .lua scripts.
git clone https://github.com/opennmt/opennmt.git
I understand now that these are scripts and don’t require compilation. At least as far as I can tell.

It’s training as I type this!

Sorry for the confusion on my part and thank you very much for your help!

Cheers!
Steve

P.S. Do I mark this as solved somehow?

the “solved” is an option you can check in unrolling the “…” at the bottom of the solving message