Single Slicer application on Linux

I would like to have Slicer installed as a shared application, but people should be able to install extensions to their own home directories.
How can I do that?

image

[Edit: I need to be able to do this without people manually going to do Application Settings->Extensions and specifying the correct path. Possibly via script, or if there is a launcher setting something like that…]

I’m not sure what’s best in general, but if this is in the SlicerMorphCloud context where there’s only one user on each instance of the container you could probably put a symbolic link in the image that points to a directory in the user’s file space.

This is not just for SlicerMorphCloud docker instance, but in general for any multi-user Linux system, with people that has separate accounts.

How common is that use case these days? For windows the Slicer default is now to install the user’s home directory which makes it more compatible with shared machines. I personally don’t use multi-user linux systems, or at least haven’t for years, but I would think that disks are big enough now that each user having their own customized installation of Slicer isn’t a huge burden. But maybe educational environments are different from my experience.

Several extensions now rely on installing Python packages from PyPI (to reduce download size and allow pip to sort out package dependencies and version compatibilities). Since all Python packages must be installed within the application folder (in lib\Python\Lib\site-packages), it is not possible to share modifiable Slicer installations between users.

You have two options:

  • A. Share a single, pre-installed, pre-configured, read-only Slicer installation between users.
  • B. Let each user have his own Slicer where he can install any extensions and Python packages.

This is the same how you would manage other Python distributions on a computer. You can either pre-install packages in the shared system Python (that users will not modify); or each user installs Anaconda in his own home folder where he is free to modify/install packages.

1 Like