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

nf-core download interprets custom registry #2311

Closed
adamrtalbot opened this issue Jun 12, 2023 · 2 comments
Closed

nf-core download interprets custom registry #2311

adamrtalbot opened this issue Jun 12, 2023 · 2 comments
Assignees
Labels
download nf-core download enhancement
Milestone

Comments

@adamrtalbot
Copy link
Contributor

Description of feature

Currently, nf-core download will not respect a custom registry which means it tries to pull from docker.io when a short container name is specified (e.g. org/tool:version). We should add the custom registry as a param. As an extension, it could interpret it from configuration files automatically.

@MatthiasZepper MatthiasZepper self-assigned this Jun 12, 2023
@MatthiasZepper MatthiasZepper added this to the 2.9 milestone Jun 12, 2023
@MatthiasZepper
Copy link
Member

MatthiasZepper commented Jun 12, 2023

I think, the easiest solution would be to provide the registry right when the singularity command is being build:

tools/nf_core/download.py

Lines 1023 to 1029 in 711d074

if shutil.which("singularity"):
singularity_command = ["singularity", "pull", "--name", output_path, address]
elif shutil.which("apptainer"):
singularity_command = ["apptainer", "pull", "--name", output_path, address]
else:
raise OSError("Singularity/Apptainer is needed to pull images, but it is not installed or not in $PATH")
log.debug(f"Building singularity image: {address}")

Since the old released pipelines do not adhere to the latest template, I think the nf-core download command could only check for a custom registry definition in $HOME/.nextflow/config or a $PWD/nextflow.config, but not consider pipeline specific configuration (although the pipeline repo is downloaded first, so it could be read from there as well)
Subsequently, that info could be used accordingly to modify the address to which the pull command is being directed.

Alternatively, we could also hardcode several standard registries with some sort of waterfall logic that the next registry is being tried if the previous one failed for whatever reason?

@mirpedrol
Copy link
Member

Done with #2336 🎉

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

No branches or pull requests

4 participants