nuest / ten-simple-rules-dockerfiles

Ten Simple Rules for Writing Dockerfiles for Reproducible Data Science
https://doi.org/10.1371/journal.pcbi.1008316
Creative Commons Attribution 4.0 International
61 stars 15 forks source link

comments about rule 9 "Order the instructions" #104

Open sdettmer opened 2 years ago

sdettmer commented 2 years ago

comments about rule 9 "Order the instructions"

Instructions must produce the same result, but independent intermediate data elements can be built concurrently, and build tools actually do that. For example, make -j<N> (to run N compiler jobs in parallel) is extremely common in my scope and can create reproducible results, although the order of the instructions is not known and may change on each build.

This might require special attention, such as not including build.log with detailed filenames and alike, and of course it is easy to create a build process where the order does matter, so care is needed.

vsoch commented 2 years ago

I don't think this rule disallows something like make -j, that is reading a bit too much into it. That rule can also be part of a logic ordering (e.g., make you have the dependencies installed first).