singularityhub / singularity-hpc

Local filesystem registry for containers (intended for HPC) using Lmod or Environment Modules. Works for users and admins.
https://singularity-hpc.readthedocs.io
Mozilla Public License 2.0
110 stars 25 forks source link

CLI control for wrapper scripts #503

Open marcodelapierre opened 2 years ago

marcodelapierre commented 2 years ago

Low priority, but just as it's fresh on top of my head :-D

Would it be useful to have a Client toggle?

--wrapper-scripts true/false

I was thinking it because people may want to use wrappers only for some containers....? But on the other hand, I am not sure whether it's worth cluttering the Client with this one


Update by @vsoch 3/3/2022: we can work on this alongside a set of client commands for wrappers too, e.g., from #495

We will eventually want an shpc wrapper command to:

  • generate custom wrappers for container already installed
  • list wrappers available for aliases, vs those selected via config
vsoch commented 2 years ago

That’s a great idea! What if we generalize to do a -c to change any config value on the fly?

marcodelapierre commented 2 years ago

wow, massive, love it!

marcodelapierre commented 2 years ago

Update on this one: I think the -c idea is great to provide highly fine grained control in a simple way.

However I think that, in addition, it would be good to provide a dedicated flag for wrapper scripts (similar to symlink tree in #502), for the same reason: I can think of scenarios where one may want to generate scripts only for certain containers (eg MPI applications), while being ok with shell aliases for the others.

A bit of background if you're interested: I think this can be the case for workstations where no job scheduler is present, or for clusters using particular schedulers that don't require prepending a scheduler executable to EVERY application (eg PBS).
The specific case in our centre is different and we'll generate wrappers for all applications: we have the Slurm scheduler, for which the best setup is one where users ALWAYS prepend srun to every application launch.

This being said, last word to you :)

vsoch commented 2 years ago

oh that totally makes sense! So I think this would make sense to work with alongside https://github.com/singularityhub/singularity-hpc/issues/495 - let me add notes from there here and I'll close the issue over there.