I was able to create proof-of-concept based on fuse-overlays
.
TL/DR: we create per-user overlay fs on top of read-only baseline install of Slicer.
Proof of concept Setup:
(as sw repository admin: - steps with a.
prefix)
a.1) Install slicer into shared, read-only directory (in our case Cern VM fs)
a.2) apply all baseline workarounds (eg. delete libcrypto.so.*
)
result: We have working Slicer in /cvmfs/sys.sw.nudz/software/Slicer/5.6.1_bin
, but we’re not able install extensions.
(as system admin - steps with b.
prefix)
b.1) make sure that fuse-overlayfs
is available at compute nodes
proof of concept:
(as user at compute node steps with c.
prefix)
prepare directories and export them as environment variables:
c.1.1): create directory for temporary working data of overlayfs and export it as WORKDIR
(assuming we’re inside of Slurm job, so using SLURM_JOB_ID
env. variable )
export WORKDIR="${HOME}/.cache/slicerfs/${SLURM_JOB_ID}"
mkdir -p $WORKDIR
c.1.2): create directory for per-user persistent data and export it as UPPERDIR
TODO: we should make this directory unique for every Slicer installation
export UPPERDIR="${HOME}/.local/slicerFS"
mkdir -p $UPPERDIR
c.1.3): create mountpoint for overlayfs in user home.
mkdir ${HOME}/SlicerMount
c.2.1): Mount overlayfs
fuse-overlayfs -o lowerdir=/cvmfs/sys.sw.nudz/software/Slicer/5.6.1_bin,upperdir=${UPPERDIR},workdir=${WORKDIR},squash_to_uid=${UID} ${HOME}/SlicerMount
now we see the mount in df
:
user@sup204:~$ df | grep Slicer
fuse-overlayfs 15300820992 13382676352 1918144640 88% /home/user/SlicerMount
user@sup204:~$
c.2.2): we can run Slicer by typing
SlicerMount/Slicer
possibly install some extensions, restart app, and see extensions files here:
user@sup204:~$ ls -1 ${HOME}/.local/slicerFS/slicer.org/Extensions-32438/
ABLTemporalBoneSegmentation
ABLTemporalBoneSegmentation-icon.png
ABLTemporalBoneSegmentation.s4ext
SlicerElastix
SlicerElastix-icon.png
SlicerElastix.s4ext
user@sup204:~$
c.3.1): Umounting overlayfs
fusermount --unmount ./SlicerMount/
Conclusion
we were able to workaround issues coming from concepts used in Slicer. Follow-up tasks are to investigate feasibility of implementation steps indicated in this P-O-C using current state-of-the-art module system, Lmod.