Skip to content
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

Seqera containers: POC 3 #45

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ewels
Copy link
Member

@ewels ewels commented Jun 17, 2024

Seqera Containers: Proof of concept No. 3

Hardcode container URIs at module level.

Workflow for generating:

  • Keep conda spec in modules up to date
  • When something changes, run the Wave CLI to fetch new container URIs and update module files
    • Either with some CI / nf-core tools code. Or using Renovate?
    • [Maybe?] Remove the registry base, as this is set in the pipeline nextflow.config

Workflow for usage: (Identical to current usage)

  • Online
    • Use nextflow run -profile docker or singularity, arm etc. (profile names up for refinement). Same as current.
  • Offline
    • Use nf-core download as done currently, no change needed.

@ewels
Copy link
Member Author

ewels commented Jun 17, 2024

Tried to set the base registry, not 100% how it works with the /library/ bit, so treat that with a grain of salt.

Comment on lines +1 to +6
def mod_container = switch([workflow.containerEngine, workflow.profile]) {
case {it[0] == 'singularity' && it[1].contains('arm')} -> 'click_pandas_plotly_express_typing:3fe674b9fa7b15b8'
case {it[0] == 'singularity'} -> 'click_pandas_plotly_express_typing:a4af841350996386'
case {it[1].contains('arm')} -> 'click_pandas_plotly_express_typing:2e5e17c7ed2d1115'
default -> 'click_pandas_plotly_express_typing:21adb9e2d1b605a5'
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These mod_container definitions should be wrapped into functions, as currently the formal grammar does not support global variable definitions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also switch expressions are not currently supported, as I would like to leave room for us to eventually provide our own pattern matching syntax

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's yet another horrible boilerplate code. -1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ewels can this be moved to a config file in the module directory? it would be easier to generate that way. and the pipeline config should include it under a profile

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea - so a module config, but that is simply imported by the pipeline config. I like it! I'll whip up a POC No.4.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think one goal of the new config parser is to remove custom code from the config

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I should be able to do it with profiles - the same as POC No.1, but just split up into config files that are bundled with the module 🤔

Dinner now but I'll try later / tomorrow.

Copy link
Member Author

@ewels ewels Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bentsherman - done in #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants