nextflow-io / nextflow-io/nextflow

Pass `$SINGULARITY_` env variables through

Open
#5,155 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

software/singularity stale
Dominant language
Groovy
Stars
3.5k
Forks
811
Avg merge
2d 11h
Merged PRs (30d)
61

Description

This is a continuation of #1386

Basically I want to set up some $SINGULARITY_* configuration variables in the environment to not require modifying config files.

Specifically I want to work with encrypted containers in one specific invocation and am hence setting $SINGULARITY_ENCRYPTION_PEM_PATH

Now NextFlow filters this variable removing it from the environment when invoking singularity. I do like the proposal to allow any SINGULARITY_* variables by default.

One solution would be to write a configfile passed via -c:

singularity {
  envWhitelist = 'SINGULARITY_ENCRYPTION_PEM_PATH'
}

But I'd like to avoid that as I'll need to pass an additional param to each invocation of NextFlow.

Given that there is singularity.cacheDir being the same as $NXF_SINGULARITY_CACHE_DIR I expected $NXF_SINGULARITY_ENVWHITELIST to work but the handling of the cache dir is a special case and only works for that.

Is there any chance to simplify passing Singularity options via the environment/globally?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Nextflow's Singularity configuration handling, especially envWhitelist and the special singularity.cacheDir/NXF_SINGULARITY_CACHE_DIR mapping described here. Determine whether SINGULARITY_* variables should pass by default; done means the requested variable reaches a Singularity invocation without a per-run config file.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.