nextflow-io / nextflow-io/nextflow

Tracking of Conda environments as a dependency

Open
#6,306 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

New feature

I may be misdiagnosing my problems but it's my belief that Nextflow doesn't do any tracking of its conda environments beside the path to the environment. I work in an HPC environment where I'd like all working files to be put on a scratch filesystem and publishing the useful artifacts to my permanent project directory, which Nextflow provides excellent support for. However, I have noticed that commands often fail due to programs going missing in my Conda environments, I believe this is due to the scratch disk cleaning up components of my environment after a period of no access.

It feels to me like Nextflow should ensure that the conda environments it creates via the conda "pkg" directive should have some tracking such that: if the conda environment is changed, then it should recreate it.

Suggested implementation

I imagine you could hash environments, if hash changes then create a new environment with the directive, if the new environment is a hash match then nothing happens, if hash changes then all processes that use that environment must be rerun.

Though I think the number of files in the average conda environment might make this prohibitive as a default, so perhaps it can be left as an optional check?

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 by tracing the conda handling behind the conda "pkg" directive and how Nextflow tracks process dependencies. Determine how an environment change could be detected without hashing every file, and how that state would affect process reruns. Done means a defined, tested behavior for optional environment tracking and recreation.

Written by the indexing model from the issue text.

Assessment

Tech stack
anaconda, groovy
Domain
hpc
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.