nf-core / modules

Repository to host tool-specific module files for the Nextflow DSL2 community!
https://nf-co.re/modules
MIT License
283 stars 718 forks source link

Use of OCI Containers #4519

Open edmundmiller opened 11 months ago

edmundmiller commented 11 months ago

Branching off from https://github.com/nf-core/modules/issues/4080#issuecomment-1834199834

Documenting a chat with @drpatelh

The issue used to be that the conversion from docker container to sif would create temporary cache files in a users home directory, and that was a user pain point on HPC systems.

I think there's two things that might fix that:

  1. The singularity cache is written to the work directory. Not sure if the conversion files are in there or not.
  2. The OCI containers thing might fix it? What if users don't have a new enough singularity version?

Essentially the goal is to get rid of the scary container logic and just point to one container.

    conda "${moduleDir}/environment.yml"
+   container 'nf-core/modules/chromap:chromap--a6833a982c474692
-   container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
-       'https://depot.galaxyproject.org/singularity/chromap:0.2.4--hd03093a_0' :
-       'biocontainers/chromap:0.2.5--hd03093a_0' }"
marcodelapierre commented 11 months ago

Hi @Emiller88 @drpatelh , as I was suggesting here : https://github.com/nextflow-io/nextflow/issues/4543

Adding the following should make it: singularity.runOptions = '--env PATH=/opt/conda/bin:\\\$PATH'

(if you move to Wave, you won't need this any more)

Feel free to let me know how it goes.

marcodelapierre commented 11 months ago

I think at this stage the OCI requirement may not be the most appropriate wording. There are more general ways to overcome the issue.

edmundmiller commented 11 months ago

(if you move to Wave, you won't need this any more)

This is blocked by https://github.com/seqeralabs/wave/issues/323.

edmundmiller commented 11 months ago

From @ewels:

  • Takes quite a lot of time / CPU and additional disk space (all of the docker layers are cached, singularity tmp dirs fill up)
  • Also you need Singularity installed, for nf-core download it's nice if you can just download a file with pure python
  • As often people are downloading on their laptops (where installing Singularity is not needed + a hassle) to transfer to a HPC
marcodelapierre commented 11 months ago

Update: going to improve Nextflow functionalities with Singularity with this PR.

Referring to the HPC issue with cache filling up:

Please keep an eye on https://github.com/nextflow-io/nextflow/pull/4548 ; happy to take it from there from the remaining issues after that is merged.

marcodelapierre commented 11 months ago

Update: going to improve Nextflow functionalities with Singularity with this PR.

Keep an eye on the PR, once merged I am happy to take it from there with you Edmund, on the remaining issues you are facing.