New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silent errors when docker building #144
Comments
Do you want to suggest a change / check to handle the trailing slash? If it's just an issue of the slash it should be fairly straight forward. I suspect that you could add some additional printing here https://github.com/expfactory/expfactory/blob/master/expfactory/cli/build.py#L84-L110 to understand why it's not being added. It could be a simple matter that os.path.exists(experiment) is returning false. I would suggest to run this container interactively with the same binds but a bash entrypoint, and then pip install ipython, and then insert this right before that loop:
And then run that expfactory build command with the same arguments. You can then interactively step through that loop and see why it's not being added, and 1. add more verbosity to tell the user, and 2. if you think it's appropriate, fail (sys.exit with a message) if something is given that isn't found. How does that sound? |
Feel free to share output / questions you have on here with me. When we find a good fix we can PR to update with it. |
Hey if you can give me a repo / example to reproduce this, I can take a look for you. It should be fairly easy to check for (and remove) trailing slashes. |
I guess you can check that with any local test of yours. I don't know if I'm allowed to make our tests public with the studies still going... |
Can you show me a dummy example for a Dockerfile, even if you can't share any actual experiment? I just need something to reproduce. Imagine locally cloning the test-task, for example. |
Now that I paid more attention to the messages, when I run this command: docker run --name build_xxx -v /data/xxx/exp-tasks:/data/ quay.io/vanessa/expfactory-builder build /data/swm_part1_inv /data/swm_part2_inv/ /data/swm_part3_inv I get the following output: Expfactory Version: 3.2.12 To build, cd to directory with Dockerfile and:
|
well in this case, the exp_id in the config.json doesn't match either of swm_part2_inv or swm_part3_inv. I don't think it's the slash here. |
The id in the config file for the 2nd experiment is defined as follows: exp_id = "swm_part2_inv" This id is compared with the folder name given in the docker command without removing the trailing slash: "swm_part2_inv" == "swm_part2_inv/" and that fails. |
Gotcha! This should be fairly easy to fix - worst case will get in a PR this weekend. |
@AlvaroAguilera I added the fixes to the PR here: 74844a3 You should be able to use the examples/docker that is added for that example (and use your same example here that broke it) to test. If we need the builder to be deployed, it might make sense to get that PR merged and then test with the build command directly. |
I'm not sure how to test this in its current state. I can do it as soon as it's merged though. |
Alright - merged - give it a bit of time to build and deploy the container (or just check the push timestamp on Quay!) |
I found another little but very annoying issue.
Compiling an instance with a command like this works perfectly well:
docker run --name build01 -v /data/exp-tasks:/data/ quay.io/vanessa/expfactory-builder build /data/test1 /data/test2 /data/test3/ /data/test4
Except that test3 is not added due to the trailing slash. Since there is no error output, you assume that everything is ok but one or several of the tests is missing....
The text was updated successfully, but these errors were encountered: