bids-apps / MRtrix3_connectome

Generate subject connectomes from raw BIDS data & perform inter-subject connection density normalisation, using the MRtrix3 software package.
http://www.mrtrix.org/
Apache License 2.0
49 stars 26 forks source link

Specify the version of MRTRix when installing #8

Closed chrisgorgo closed 7 years ago

chrisgorgo commented 7 years ago

This could be a commit hash or a tag. By specifying it in Dockerhub you will be able to trigger image rebuilding by updating the version in the file. It also helps with figuring out which version was used to build the container without having to pull the image.

Lestropie commented 7 years ago

We generate version tags like this: '0.3.15-367-g05dee093', which is the tag (0.3.15) followed by the number of commits since that tag, and then a hash snippet. So it makes sense that that's what should appear.

Not quite sure how best to handle this though. Should this go into its own 'version' file in the repo? When the container is built, should it be this version of MRtrix3 that is pulled and built, or should the version file be updated with whatever the build process pulls? It's slightly difficult here since MRtrix3 is still a moving target, we don't yet recommend versions at a particular tag but encourage use of the latest code, and the BIDS app script I expect will undergo its own parallel development so needs its own separate version tag.

chrisgorgo commented 7 years ago

I probably wasn't too clear when describing the problem. In this line you are checking out the latest commit in the 'stanford' branch. This is problematic for two reasons 1) Docker is caching each line of the Dockerfile in a separate layer, it decides whether to reuse a cached layer based on the content of the Dockerfile; to force getting a new version of mrtrix this line would have to change 2) it would be nicer to have a clear indication of which version of MRtrix was used in this container (in the Dockerfile).

The easiest way is to checkout a commit hash or a tag. Like Anders is doing in BROCCOLI https://github.com/BIDS-Apps/BROCCOLI/blob/master/Dockerfile#L54

Now you also mentioned the version of the MRtrix3_connectome BIDS App. I have written about versioning extensively here: http://bids-apps.neuroimaging.io/dev_faq/ but you are raising a few new issues:

1) the /version file should not be touched - it is only a placeholder that is filled with the current tag in CircleCI (see: https://github.com/BIDS-Apps/MRtrix3_connectome/blob/master/circle.yml#L16)

2) when releasing a new version of the MRtrix3_connectome BIDS App you can use any string that is valid Docker Hub tag (so no "+" signs). It's really up to you. I would however recommend something that is combination of the version of the MRtrix installed in the container image and the version of runscript/Dockerfile. For example 0.3.15-367-g05dee093-2.

I hope this helps!

Lestropie commented 7 years ago

It's now a specific MRtrix3 commit hash that is checked out. Eventually this will be an MRtrix3 tag as we move to more stable versions, but for now I needed various fixes in a separate branch to get things going fully.

Regarding version numbering: I'm having this BIDS App follow its own version numbering. Updates to it may not track the MRtrix3 versioning very well or at all. Instead I I just have Dockerfile write the MRtrix3 version to a file in root during construction of the container.