clarinsi / csmtiser

A tool for text normalisation via character-level machine translation
GNU Lesser General Public License v3.0
13 stars 6 forks source link

Problem running csmtiser with docker #2

Closed TomazErjavec closed 7 months ago

TomazErjavec commented 7 months ago

I tried the command that is given in the README.md, but I get the following:

tomaz@new-tantra csmt$ sudo docker run -v ~/csmtiser:/csmtiser greegorey/csmtiser python preprocess.py
python: can't open file 'preprocess.py': [Errno 2] No such file or directory

@nljubesi, would you have any idea what is wrong, or know somebody that does?

(for some reason I also need to run with sudo, otherwise I get a permission error, this might be something to do with our installation, investigating...)

nljubesi commented 7 months ago

Am I correct that Bojan Evkoski was showing you how to run csmtiser in docker before?

I am not very surprised about the sudo requirement, docker is a wild beast (that I do not know much about).

Depending on what the status of our previous trials was, I would either 1. request guidance from Bojan or 2. dig in myself. I need a refresher on the status of your wider request "I want to use csmtiser in docker" before we can continue.

TomazErjavec commented 7 months ago

Am I correct that Bojan Evkoski was showing you how to run csmtiser in docker before?

Yes, but that was theoretical - he wrote down the steps, and now I went through them, and I failed as explained above.

I am not very surprised about the sudo requirement, docker is a wild beast (that I do not know much about).

That was solved in the meantime - the trick is to add oneself to the "docker" group, and then (and this is where I failed) to completely log-out and log-in again so that the effect takes place (just starting another shell is not sufficient).

Depending on what the status of our previous trials was, I would either 1. request guidance from Bojan or 2. dig in myself. I need a refresher on the status of your wider request "I want to use csmtiser in docker" before we can continue.

Thanks for answering this, as it forced me to re-do everything in order to give you the minimal way of reproducing the error, and I found the solution to this problem by more carefully reading the docker README.

The problem was that I did docker run -v ~/csmtiser:/csmtiser but my csmtiser wasn't in my home directory, so it didn't work. A stupid mistake of course.

And now I can run it with the default ˙``` docker run -v /project/csmt/csmtiser:/csmtiser greegorey/csmtiser python preprocess.py /csmtiser/docker/config.docker.yml Learning the truecaser Truecasing train, dev, lm Truecasing /csmtiser/datasets/sentence_level/tweet_sl Reading data for splitting into train and dev Splitting the data Preparing the data for learning the models



So, hurrah! And closing.
nljubesi commented 7 months ago

Hurrah on my side as well!