-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Singularity OCI mode #4440
Conversation
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@emi80 you may want to give a try to this branch |
Hey @pditommaso, thanks a lot! I see you eventually had to do it by yourself, as usual... You are too fast! I will have a try at this tomorrow and let you know! |
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Hey @pditommaso, tryed to run as from your guideline and got the following error on an Ubuntu 22.04 machine and
It seems like exporting those two env variables in the command makes it work. |
oohh, should not those vars be provided by the host environment? |
Yes, but the Singularity command in |
also, I am not sure how much this is reproducible on other host systems |
If I run the command:
it pulls the image, but then gives me the following error:
|
Removing |
ok, then adding those to the https://www.nextflow.io/docs/latest/config.html#scope-singularity
Independently of the above variables? |
This adds
That is because it prepends
No, |
Ok, those variables can added explicitly, but are those names portable? Also, I'm still confused by the |
As far as I understand those variables are standard and are needed to use cgroups v2.
Maybe this is something related to the pipeline I am running: |
I can confirm that with |
Ok, i'll just add the support for |
Thanks! It seems that Indeed, it seems to be an issue with Singularity and OCI:
|
You can use |
But HOW?! 😆 |
I opened sylabs/singularity#2289. Let's see what they tell me... |
Where did you added XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS vars to test it? |
It's a problem with the low-level runtime that Singularity uses in |
I put them before PATH in the singularity command in
|
It looks like setting |
If it's a singularity problem, I'm inclined to ignore it, and only add the variables |
Indeed, it's actually an OS problem so you can safely ignore it 👍 |
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
-1 for latest changes (apart of course for I agree to default SingularityCache should be disabled when OCI mode is enabled |
then we should put a clear warning on the docs, |
Otherwise OK with what you say - see also Sylabs Dave's comments around OCI mode in Singularity - I did not have a clear enough picture of the scope for OCI mode. We should aim to have I will work on it, and I think we're on track to finalise this on Monday. |
Ok, now I've realised that --oci implies --compat by default (i had understood the opposite) What's the side effect of using the same default when OCI is enabled on our side? |
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
618b83e
to
d7e9932
Compare
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@marcodelapierre moved your changes to #4483. |
I'm testing this branch with classic nf-core/rnaseq + Singularity OCI mode enabled (using defaults) + Wave and it looks working fine. Instead, some problems are reported when enabling the Fusion support. I've opened an issue specific for it separately |
I am about to do a commit that should fix some issues, not sure about yours, hold on |
So @pditommaso @emi80 I confirm that Dave helped me build a clearer and correct picture of OCI mode in Singularity 4 in this Github issue: the key aspect is that by definition, OCI mode aims to have Singularity behave as close as possible to Docker. I only have one outstanding little fix to propose, and will then perform some extra tests. |
Ok, please make a separate PR. |
Here we go @pditommaso : #4484 This fixes issues experienced with certain pipelines (eg I am wondering whether this will also fix the Fusion issues .. although I don't know their nature at the moment. |
@pditommaso just saw this bit of thread right now. It is the usual issue with conda/mamba base images not being designed for Singularity. We have gone through this before, and now I actually have 2 PRs opened with Conda and Mamba devs to try and fix these issues (for Mamba: mamba-org/micromamba-docker#381). Ultimately, it is the very same issue with the rnaseq-nf container: https://github.com/nextflow-io/rnaseq-nf/blob/master/docker/Dockerfile#L13 The same workaround can be applied inside Wave when building the container for the |
Indeed, the same patch has been applied to the Wave build for Docker seqeralabs/libseqera@348cf29 |
.... and #4484 also ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
One change on
compat
option, file modules/nextflow/src/main/groovy/nextflow/container/SingularityBuilder.groovy -
Test files may need updating as a consequence: modules/nextflow/src/test/groovy/nextflow/container/SingularityBuilderTest.groovy , modules/nextflow/src/test/groovy/nextflow/executor/BashWrapperBuilderTest.groovy
Note I would NOT document the compat
option, should only be for internal debug use
modules/nextflow/src/main/groovy/nextflow/container/SingularityBuilder.groovy
Outdated
Show resolved
Hide resolved
after chat: Let's remove the |
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Done |
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
ok, let's merge this |
This PR adds support for the OCI-mode provided by Singularity 4. More details at this link.
Guidelines for testing
Install Singularity 4 and
runc
(see here for details)enable the singularity OCI mode in the nextflow config
run a test pipeline