Mate Desktop in a Singularity container?

Yes, we do. The modifications are very minimal. Basically, it’s another copy of /var/www/ood/apps/sys/bc_desktop called something else (we added _container to ours), and then modifying both the submit.yml.erb and the script.sh.erb files for it. We also do not have the VNC server installed in the image, so we work around that as well.

Basically, for submit.yml.erb, all we do is load the Singularity environment module and make another alteration to $PATH as well as define $WEBSOCKIFY_CMD as we also don’t have that installed in our image. Then in templates/script.sh.erb, all we do is change the command in the way it’s described in the above quote. We pass some command line flags to Singularity, but those are site-specific bind mounts, and are as likely to be handled by singuality.conf as need to be handled that way.

Do you already have the Singularity image? That part I didn’t personally work on, but I bet the definition for it is laying around somewhere. Seems like it’s probably just installing the “MATE Desktop” or similar group, though, and perhaps the scheduler?