Singularity: user option to disable home directory mount when automatic $HOME enabled in singularity.conf

Created on 12 Feb 2018  路  6Comments  路  Source: hpcng/singularity

Version of Singularity:

$singularity --version
2.4-dist

We have disabled home directory mount system wide to accommodate a user that needs this disabled but we want this option enabled to the user at singularity command. To the best of my knowledge there is no option to disable home directory from a singularity option. Options like -H or --bind only deal with redirecting home directory to a location in container.

Actual behavior

Right now we have done the following change

$ cat /etc/singularity/singularity.conf | grep "mount home"
mount home = no

This option should be with singularity exec singularity shell singularity run singularity test

Question

Most helpful comment

There should be an option at command line to singularity --disable-mount=home and singularity --disable-mount=tmp which disables mount for /home and /tmp inside container rather than invoking this in singularity.conf.

All 6 comments

@GodloveD @bauerm97 is this already implemented in new release? I would like to have this feature

There should be an option at command line to singularity --disable-mount=home and singularity --disable-mount=tmp which disables mount for /home and /tmp inside container rather than invoking this in singularity.conf.

This would be a good feature.

Yes please.

There is --no-home but no --no-tmp, so I'd second a --no-mount=[home|tmp|all(?)], but see caveat with $PWD in https://github.com/sylabs/singularity/issues/1656

There is now a --no-mount feature in 3.7

Was this page helpful?
0 / 5 - 0 ratings