Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the CLI commands for the Singularity Cache Dir
Browse files Browse the repository at this point in the history
MatthiasZepper committed Apr 26, 2023

Verified

This commit was signed with the committer’s verified signature.
KyleFromNVIDIA Kyle Edwards
1 parent e896064 commit fddffad
Showing 2 changed files with 220 additions and 103 deletions.
36 changes: 32 additions & 4 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
@@ -233,19 +233,47 @@ def launch(pipeline, id, revision, command_only, params_in, params_out, save_all
"-c", "--container", type=click.Choice(["none", "singularity"]), help="Download software container images"
)
@click.option(
"--singularity-cache-only/--singularity-cache-copy",
help="Don't / do copy images to the output directory and set 'singularity.cacheDir' in workflow",
"-s",
"--singularity-cache",
type=click.Choice(["amend", "copy", "remote"]),
help="Utilize the 'singularity.cacheDir' in the download process, if applicable.",
)
@click.option(
"-i",
"--singularity-cache-index",
type=str,
help="List of images already available in a remote 'singularity.cacheDir', imposes --singularity-cache=remote",
)
@click.option("-p", "--parallel-downloads", type=int, default=4, help="Number of parallel image downloads")
def download(pipeline, revision, outdir, compress, force, tower, container, singularity_cache_only, parallel_downloads):
def download(
pipeline,
revision,
outdir,
compress,
force,
tower,
container,
singularity_cache,
singularity_cache_index,
parallel_downloads,
):
"""
Download a pipeline, nf-core/configs and pipeline singularity images.
Collects all files in a single archive and configures the downloaded
workflow to use relative paths to the configs and singularity images.
"""
dl = nf_core.download.DownloadWorkflow(
pipeline, revision, outdir, compress, force, tower, container, singularity_cache_only, parallel_downloads
pipeline,
revision,
outdir,
compress,
force,
tower,
container,
singularity_cache,
singularity_cache_index,
parallel_downloads,
)
dl.download_workflow()

Loading

0 comments on commit fddffad

Please sign in to comment.