I am trying to build a Dockerfile where I can install the extensions. I am following the instructions in here
As I understand, that requires knowing what folders exist in the lib/Slicer-4.11/ for every extension beforehand and adding those paths one by one to Slicer --additional-module-paths to enable them.
We have a number of extensions to install. Is there a more compact way doing this?
It’s possible to set up a custom .ini file with all the paths listed. Or you can copy all the files into a common lib directory and specify that on the command line.
I have tried this approach. BUT, slicer ask for restart and if you just call another slicer command it says the extension is not properly installed. See these errors.
I don’t see any errors related to extension install.
Once the extension is installed, you don’t need to restart Slicer, just exit Slicer and when you start it next time it works well. You can see how it works in SlicerJupyter docker image (see link above).
You can use the SlicerJupyter docker image as an example of setting up display properly and use Slicer’s extension manager to install the extension. By following @pieper’s suggestion you can make installation even simpler (by making extension manager download the extension, too, instead of manually downloading it from a URL).
Showing GUI or not is your choice, but you need to set up a display server to run the full application. It does not mean that you need to display a GUI at the host.
The slicer-notebook docker image that I linked above installs SlicerJupyter. Replace that by SlicerElastix and you are good.
You can jusr just the relevant parts of the image: setting up the display server and installing an extension. There are many other Slicer docker images for various purposes. You can find references to them in posts in this forum.
Unfortunately, we don’t have a single location where all the images are listed at, but we could create it now. @pieper, @muratmaga, @mau_igna_06 what do you think about adding links to all known Slicer docker (and singularity, etc.) images at SlicerDocker/README.rst at master · Slicer/SlicerDocker · GitHub? The earlier idea of having a single hierarchy of images may be unrealistic, but at least collecting links (with a 1-2 sentence description of each) at a single location should be feasible.