-
Notifications
You must be signed in to change notification settings - Fork 11
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
Use Seqera containers in pipeline #36
base: dev
Are you sure you want to change the base?
Conversation
I ran the command below within the pipeline root to build and push the containers to the community registry:
However, I can't pull all of the containers: ✅ How can I check if these containers have been built or am I doing something wrong? |
Co-authored-by: Esha Joshi <[email protected]>
// Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile | ||
// Will not be used unless Apptainer / Docker / Podman / Singularity are enabled | ||
// Set to your registry if you have a mirror of containers | ||
apptainer.registry = 'quay.io' |
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.
We could set these to community.wave.seqera.io
if we want think. For the same reasons we added quay.io
here in the first place.
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.
community.wave.seqera.io/library/tower-cli:0.9.2--dc544a7e574ab73b
What does the library
mean in the URI? Will this always be the same for different registries? So do we need:
apptainer.registry = 'community.wave.seqera.io'
docker.registry = 'community.wave.seqera.io'
podman.registry = 'community.wave.seqera.io'
singularity.registry = 'community.wave.seqera.io'
or this:
apptainer.registry = 'community.wave.seqera.io/library'
docker.registry = 'community.wave.seqera.io/library'
podman.registry = 'community.wave.seqera.io/library'
singularity.registry = 'community.wave.seqera.io/library'
or none of these based on @pditommaso comment?
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.
You don't need to use container
with Community registry, hence you don't need registry
either
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.
The reason for including this is so people can quickly repoint to their own registry if they are using freeze
, i.e. set all of these to myprivateecr.registry.io
. On the other hand, they can just do this themselves and disregard all the community containers 🤔 . I don't think we ever worked out the developer workflow here.
@drpatelh you should do either 1 of two things here:
docker.registry = 'community.wave.seqera.io/library'
and the container directive iscontainer 'click_pandas_plotly_express_typing:21adb9e2d1b605a5'
- Do not set
docker.registry
and use the directivecontainer 'community.wave.seqera.io/library/click_pandas_plotly_express_typing:21adb9e2d1b605a5'
The docker.registry is added as a prefix if it does not exist in the URI of the container already (i.e. it's idempotent). What you have done here is fine but redundant and the registry
config option will be ignored.
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.
p.s. not certain about library
, this depends on Wave + ECR behaviour.
@@ -2,7 +2,7 @@ process PLOT_RUN_GANTT { | |||
tag "$meta.id" | |||
|
|||
conda 'click=8.0.1 pandas=1.1.5 plotly_express=0.4.1 typing=3.10.0.0' | |||
container 'seqeralabs/nf-aggregate:click-8.0.1_pandas-1.1.5_plotly_express-0.4.1_typing-3.10.0.0--ccea219dc6c3d6a1' | |||
container 'community.wave.seqera.io/library/click_pandas_plotly_express_typing:21adb9e2d1b605a5' |
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.
NOOOOOOOOOO
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.
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.
We made this to have containers made via the Conda packages declaration. Why bumping the community container image?
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.
Have we figured out how to run these pipelines in offline environments? Is this going to be inherently taken care of by nf-core download
and not handled by NF/Wave anymore @ewels ?
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.
No - if we want to run offline then we cannot use Wave.
The only way that I can see around this is to have the Nextflow Wave plugin create the conda + dockerfile locally and from that figure out what the image name should be. Then this could be checked against the local docker / singularity cache without doing any calls to the internet. But I've spoken to @pditommaso about this already and I think that it was difficult / impossible.
So until we figure that out, I can't see any way to use Wave directly in nf-core pipelines, as it will break all offline usage. So the hardcoded docker + singularity URIs have to stay.
We can of course use Wave to build those images and so my hope is that the developer can specify just the conda requirements and then the automation will pin the image names into a config without human intervention.
If anyone has any better ideas, shout!
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.
We are near to have nextflow inspect
to report the HTTP uri of the Singularity image files. Would not that allow handling them in the same manner as it's done for Biocontainers right now?
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.
The only way that I can see around this is to have the Nextflow Wave plugin create the conda + dockerfile locally and from that figure out what the image name should be.
Is it possible to use the hash and check for existing containers before hitting Wave? This doesn't help with offline usage, but does bypass Wave when it isn't needed. Furthermore, it could check for existing Singularity containers for some offline use right now. I'm assuming the hash in the filename is complete enough to do this check which seems like quite a large assumption.
We can of course use Wave to build those images and so my hope is that the developer can specify just the conda requirements and then the automation will pin the image names into a config without human intervention.
I assume this is the end goal but don't see how we'd get there and still include offline support?
Currently the workflow for nf-core would be essentially:
- play with 'interactive' Wave + Conda for development
- use https://seqera.io/containers/ to build the 'static' container and grab the URI
- add this to process container directive(s)
- open PR to nf-core/modules
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.
Is it possible to use the hash and check for existing containers before hitting Wave?
Wave generates the hash, so no
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.
OK, we'll have to stick with process.container
for now.
apptainer.ociAutoPull = true | ||
singularity.ociAutoPull = true | ||
wave.enabled = true | ||
wave.freeze = true | ||
wave.strategy = 'conda' |
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.
If we are using Wave behind the scenes to get the container URI, do I need to move these out of a profile and into the top-level config so they are always on?
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.
It's keep into a separate profile
I also still don't know why these containers weren't created 😏 |
apptainer.ociAutoPull = true | ||
singularity.ociAutoPull = true |
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.
apptainer.ociAutoPull = true | |
singularity.ociAutoPull = true |
Not needed. Those forces the use of Docker image what's converted by Singularity
If you have your tower auth token set locally then you should get emails when you run For now that's the only method I know of to be able to figure out the build status. |
I was able to generate the tower-cli one but I get a different hash: community.wave.seqera.io/library/tower-cli:0.9.2--28258d337ec30808 |
seqera_containers
profile to build and push containers to community registry via Waveconda
declaration within a process vs a separateenvironment.yml
(like was updated on nf-core recently for all modules e.g. fastqc). The latter impacts the name of the container being built as NF will use the name entry in the YAML as opposed to the package names in theconda
declaration. That makes sense, but it will make it trickier to reuse containers with the same packages across modules. I have always preferred having an explicitconda
definition in the process itself to avoid having to open numerous files to figure out software versions. Something worth looking into before rolling this out on nf-core more widely.--singularity_pull_docker_container
for Wave to implicitly handle pulling the correct container