tools icon indicating copy to clipboard operation
tools copied to clipboard

Add docker downloads

Open nikhil opened this issue 8 months ago • 4 comments

resolves: #2309

This PR adds docker support to the pipeline download functionality

  • Many of the singularity functions were made container agnostic and reused for docker purposes
  • Looks like this will run into merge conflicts as there are multiple refactors running concurrently (#3509, #3506)

This PR uses the guide to download the image: https://github.com/nextflow-io/nextflow/discussions/4708

It mimics Singularity's cache env variable by using the new env variable NXF_DOCKER_CACHEDIR, the downside is that this is not an official env in nextflow and the user needs to run

ls -1 [$NXF_DOCKER_CACHEDIR]/*.tar | xargs --no-run-if-empty -L 1 docker load -i

on their own as nextflow currently has no way of loading offline tar files

This PR is a rework of https://github.com/nf-core/tools/pull/3516, to use the new container class created here: https://github.com/nf-core/tools/pull/3509

PR checklist

  • [ ] This comment contains a description of changes (with reason)
  • [ ] CHANGELOG.md is updated
  • [ ] If you've fixed a bug or added code that should be tested, add tests!
  • [ ] Documentation in docs is updated

nikhil avatar Mar 26 '25 21:03 nikhil

Codecov Report

:x: Patch coverage is 30.28571% with 366 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 75.77%. Comparing base (33830f9) to head (72b6d60). :warning: Report is 840 commits behind head on dev.

Files with missing lines Patch % Lines
nf_core/pipelines/downloads/docker.py 0.00% 200 Missing :warning:
nf_core/pipelines/downloads/singularity.py 39.17% 163 Missing :warning:
nf_core/pipelines/download.py 90.90% 2 Missing :warning:
nf_core/pipelines/downloads/utils.py 97.14% 1 Missing :warning:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Mar 26 '25 21:03 codecov[bot]

Thank you, Nikhil for refactoring #3516 into a separate class for Docker downloads and directly basing it on the other PR. Much appreciated, and apologies again for the fuss and my coordination failure.

I will focus getting the refactored Singularity download in first, but then get back to this PR to review and finalize the Docker support. Once that becomes available, it will be the first major new feature for nf-core pipelines download in several years, so thank you very much for working on it!

I think, it would be very useful to have Nextflow supporting the NXF_DOCKER_CACHEDIR environment variable that you are proposing. You should open an issue on the Nextflow repo for that!

MatthiasZepper avatar Mar 28 '25 12:03 MatthiasZepper

Sounds good, thanks so much for working on finishing this up!

nikhil avatar Mar 28 '25 14:03 nikhil

Hey, I added a feature request for NXF_DOCKER_CACHEDIR here: https://github.com/nextflow-io/nextflow/issues/5938

nikhil avatar Apr 02 '25 17:04 nikhil

Thanks a lot! Your contributions have been merged into #3634. If you have time to review and test, this would be amazing!

MatthiasZepper avatar Jul 30 '25 10:07 MatthiasZepper