It’s as simple as copying the bin/
, lib/
& share/
folders across to where you want them to be. I have to admit this is poorly documented for the current version, but is actually described in some detail for the next release (due to be pushed out imminently) – and this description applies equally to the last couple of versions.
In essence, MRtrix3 is designed to be fully relocatable: you can move the folder anywhere on the filesystem, and it’ll work just the same. There’s no need to set a prefix
since there’s nothing in the code that depends on it, whether at build time or at runtime. The only requirement is that the bin/
, lib/
& share/
folders remain co-located within the same parent folder.
I’m not surprised: our configure
script, while written is python
, is completely specific to MRtrix3 – there’s no way you could possibly have come across anything like it before.
It completely is. We do this routinely, and it is very simple to do, especially following this discussion and the changes that resulted from it. All you need is to place the relevant folders in different locations, and set the PATH
to point to the relevant bin/
folder.
For example, after a successful build, just copy the bin/
, lib/
& share/
folders across to where you want them to be, e.g.:
# from MRtrix3 source folder, as root if required:
mkdir -p /usr/local/mrtrix3-3.0_RC3
cp -r bin/ lib/ share/ /usr/local/mrtrix3-3.0_RC3/
So you might end up with these folders for 3 different versions of MRtrix3:
/usr/local
├── mrtrix3-3.0_RC1
│ ├── bin
│ ├── lib
│ └── share
├── mrtrix3-3.0_RC2
│ ├── bin
│ ├── lib
│ └── share
└── mrtrix3-3.0_RC3
├── bin
├── lib
└── share
Then all your users would need to do is set the PATH
to point to the bin/
folder for the version required:
export PATH=/usr/local/mrtrix3-3.0_RC2/bin:$PATH
How this is handled is up to you. I expect many sysadmins will want to set up a module load
script to do this, but there’s no hard requirement on that front.
Hope this helps.