As I understand Slicer has two ini files.
Slicer.ini, which is sort of global and is read by all Slicer versions installed and then there is Slicer-XXXXX.ini which is version specific.
For our docker instance we bake the Slicer application and Slicer.ini into the container, but we need to have Slicer-XXXX.ini on a persistent storage so that last loaded files, additional modules and user specific customizations are saved and retained in between sessions.
Is there an option that I set in global Slicer.ini to look for a specific folder for version specific Slicer-XXXXX.ini? I can of course do a volume mapping between host and docker for Slicer-XXXXX.ini file, but that means it needs to be modified everytime Slicer version is changed.
I am also open to other suggestions as well.
I don’t think we have anything like that now, but it might be a place where an environment variable could be added to handle this use case. Like a
SLICER_VERSIONED_INI_PATH or similar.
So should I add this as a feature request to GH issues?
Yes, sure. Then if anyone has other ideas we can discuss it there.
Slicer.ini is only used if you haven’t created a Slicer.ini file in the
<application home>/<organization> directory (next to your
Slicer-NNN.ini file). See details here.
I see two options:
- If you do not let users install new extensions: keep Slicer.ini in the default user profile folder location and preserve the content of that folder.
- If you let users install new extensions: Create a
Slicer.ini file in your
<application home>/<organization> directory and make the entire
<application home> folder persistent. If you want to minimize storage requirements then it will be a bit more complicated, as you need to persist a couple of folders, such as:
<application home>/<organization> (settings and extensions)
<application home>/lib/Python/Lib/site-packages (Python packages installed by extensions)
<application home>/lib/Python/Scripts (script for Python packages installed by extensions)
<application home>/DICOMDatabase (whereever you configure it, but it is more consistent if you keep all files at one location)
- you may consider persisting the cache folder, too
I may consider going back to putting whole Slicer folder in a persistent volume, which we used to do. It will definitely simplify the number of exported volumes. I think that might be the easiest and most flexible option.