singularity
singularity copied to clipboard
specify binds in sif file
Version of Singularity:
3.0.1
Expected behavior
It would be really nice if we could specify what directories need to be mounted at container creation, and then those containers are automatically mounted when the container is run. Would be particularly useful for containers with software that writes into the home directory by default, but there are a bunch of other use cases as well.
Actual behavior
This is not a thing.
Voicing support for this. Are there any non-obvious security concerns with allowing this functionality?
@omento There should be no security concerns with providing this, as we nominally allow users to bind mount arbitrary locations into the container.
However, there are potentially some non-obvious concerns w.r.t. container portability when moving from one site to another, where the SIF asks for automatic bind mounts which don't exist. I think these are things we can work around, but we definitely need to consider those scenarios.
@bauerm97 What if container run checks if all bind mounts are present, and if not, errors out saying the user must manually add --bind for the missing mounts to the CLI run command (for the source only, not the destination part).
I closed my issue to keep this open and advocate for possibility to include in sif image default options (cli arguments) for running (literal non-processed strings, so one can use env variables). So, i think that the included arguments should be validated in the same way as used in command line, and if invalid just throw errors (like usual). It is the responsibility of the builder to provide sane default options. Moreover would be interesting to have a SINGULARITY_DEFAUL_OPTS that would be automatically pre-pendended to whatever arguments are in the cli, and any other options (be they environment or cli) would overwrite what is set up as defaults. (and in def file the section could be something like $defaultargs)
Hello,
This is a templated response that is being sent out to all open issues. We are working hard on 'rebuilding' the Singularity community, and a major task on the agenda is finding out what issues are still outstanding.
Please consider the following:
- Is this issue a duplicate, or has it been fixed/implemented since being added?
- Is the issue still relevant to the current state of Singularity's functionality?
- Would you like to continue discussing this issue or feature request?
Thanks, Carter
This issue has been automatically marked as stale because it has not had activity in over 60 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
@GodloveD We're looking into the issue carefully, soon will bring to community and discuss ways to better solve as well address this. Thankyou for keeping the interest in the subject.
Pending issues from the old repo copied to the new repo (https://github.com/apptainer/apptainer/issues/1390) and cleaned from the old, retired repo.