Open JohannesWiesner opened 1 year ago
Dear @JohannesWiesner,
I ran into the same problem when building spm12 and cat12 for the Neurodesk project. The problem is that the neurodocker SPM recipe installs MCR_R2010a (and that's hardcoded) and CAT12 currently requires R2017b (that's not installed via the neurodocker build script).
If you really want both in the same container you could install them manually with matching MCR versions by combining these two build scripts: https://github.com/NeuroDesk/neurocontainers/blob/master/recipes/spm12/build.sh https://github.com/ReproNim/neurodocker/blob/master/neurodocker/templates/cat12.yaml
CAT12, however, only exists for R2017b: http://141.35.69.218/cat12/?C=M;O=D
so you need to change SPM to this as well.
The MCRs are somewhat backward compatible, but ideally, you want to match the versions exactly.
I hope that helps Cheers Steffen
Ah, I see. Would it help if both CAT12 and SPM get their own/private MCR (thus increasing the final image size, but possibly making the building process less prone to errors?)
that could be one consideration. another is also perhaps adjusting the requirements in the templates to a common mcr would allow it to work together even without an external mcr line. i think this is also true of freesurfer, which has some matlab components. would welcome PRs.
in the longer term we need to essentially do something like conda/mamba's conflict resolution detection across packages.
Common MCR sounds like a fancy idea, but then the script would have to be smart enough to detect if SPM/MCR is already present, which came first, and since CAT12 only works with MCR2017b it would have to throw an error if SPM was installed with a non-compatible MCR version. I would rather wait until Christian Gaser also provides more recent MCR versions and pay the price of a bigger image but ensuring a more modular building process for now. Then the installation of SPM and CAT12 could be specified as:
--spm12 version=r7771 \
--cat12 version=r1933_R2017b \
without the user having to specify additionally:
--matlabmcr version=2017b
since this would then happen automatically in the background once --cat12 version=r1933_R2017b
is provided.
Dear @JohannesWiesner ,
Another problem that arises from installing both SPM12 and cat12 in the same container is: The executable "run_spm12.sh" is identical for SPM and CAT - so it might not be nice to use even if you get it to work with matching MCRs?
We "solved" this problem in the www.Neurodesk.org project by installing SPM12 and CAT12 in separate containers and we then use lmod to handle the paths. Have you thought about doing that or using Neurodesk to achieve what you want? Have look here and see if that works for you: https://play.neurodesk.org/
Cheers Steffen
@satra - I've opened new issue #513 re. the conflict in conda/mamba
@JohannesWiesner - did you menage to build your container?
Should we close the issue?
@djarecka, no I haven't so far. But how is #513 related to this issue?
@djarecka , sorry I am confused. You linked this issue to your conda/mamba issue, but I don't see how the two are related. This issue deals with conflicts of a parallel installation of CAT12 and SPM12. Mamba/conda have nothing to do with this unless I have overseen something?
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
This issue is stale because it has been open for 30 days with no activity.
I would like to add both CAT12 and SPM to our docker image. Installing both independently works fine, but when adding both I get the following error:
This is the script to generate the Dockerfile. Following the suggestions from the docs, I am using the 2017b MCR version for CAT12:
As described above, deleting either
or
will work fine.