singularity icon indicating copy to clipboard operation
singularity copied to clipboard

plugin/example: --bindlibs flag to automatically mount named libraries from host

Open ch741 opened this issue 7 years ago • 6 comments

It would be nice to have an option similar to --nv where the user can specify a library and singularity finds that library and binds it internally. Example:

singularity shell --bindlibs libcudnn.so:libmlx5-rdmav2.so cuda.img

This is more for convenience but it can simplify things a lot, especially on a cluster where libraries could be installed in various different places.

ch741 avatar Jun 28 '17 15:06 ch741

Hi! I really like this idea, however I'm not sure the best way that we can make it work. Unfortunately, we can't allow users to bind arbitrary single files (as opposed to arbitrary directories) into the container, as it appears that the kernel doesn't respect the MS_NOSUID mount flag when bind mounting a single file. @gmkurtzer was there ever any resolution to why that was happening?

bauerm97 avatar Jun 29 '17 13:06 bauerm97

Nope, I never got a definitive word back from a kernel developer on this, but the PR_SET_NO_NEW_PRIVS was always our fallback on this (and one of the reasons why user bind mounts are prohibited if that option is not available).

We could however handle this in the same way as we are doing the nvidia libraries, but I am concerned about the portability implications of binding libraries that are built for a specific distribution into a container.

gmkurtzer avatar Jul 01 '17 18:07 gmkurtzer

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:

  1. Is this issue a duplicate, or has it been fixed/implemented since being added?
  2. Is the issue still relevant to the current state of Singularity's functionality?
  3. Would you like to continue discussing this issue or feature request?

Thanks, Carter

carterpeel avatar May 15 '21 16:05 carterpeel

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.

stale[bot] avatar Jul 14 '21 17:07 stale[bot]

What about a local temporary volume can be set, and then a remote one, in the .def file, be defined. This could help to fetch libraries across a cluster or over the public internet. This helps too in a way for old libraries being discontinued or out of support, any local copy can be obtained across all applications, without any tweaks.

pedroalvesbatista avatar Jul 14 '21 22:07 pedroalvesbatista

@ch741 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.

pedroalvesbatista avatar Jul 15 '21 00:07 pedroalvesbatista

We are cleaning up old issues in the old Singularity repo. This sounds like nice to have feature than a critical issue so we are closing it. If the author still needs it please reopen a new issue under the new Apptainer repo. Thanks.

kmuriki avatar Aug 16 '22 01:08 kmuriki