Understanding internals about how Nextflow runs containers #4822
Unanswered
alexhermida
asked this question in
Q&A
Replies: 1 comment
-
You can see how nextflow run the container checking the docker command in the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! first thanks for the great tool you've made, I'm still learning most of the configurations and specifics but looks great, and the configuration is good as well.
This is more for understanding how Nextflow uses the underlying system where it runs rather than asking for help 😄 I came a across an issue while I was building some workflows which I'd like to understand better, and I coded a small and reproducible example.
With the following small Python script:
the following Dockerfile
and the following Nextflow process
I noticed that the behaviour running this directly in Docker and in Nextflow with the same Docker image is different.
In both cases, this will generate a
metadata.json
file, with Nextflow lives within the specific workflow run folder.But for the case of running it with Nextflow, even though is running the same Docker image, the file it generates is empty whereas in with
docker run
it has content.I'd expect this could happen if that code was running in different systems, as the behaviour for
shutil.move
could change between different systems but not happening running the same docker image.This can be easily solvable in the code adding a
tmp_file.flush()
before moving the file, which I think it's more correct anyway.What puzzles me is why this is happening, and what makes the code behaves differently if the underlying system is the same.
Thanks for your help!
Best.
Beta Was this translation helpful? Give feedback.
All reactions