Hello all. Sorry for the probably very dumb question and thanks in advance for your patience and your time!
I’m developing a Nextflow pipeline and encountering an issue with installation of the environment using mamba instead of conda.
My environment:
- Nextflow: 24.10.4
- Mamba: 2.0.7
- Conda: 25.1.1
The Issue: When running my pipeline with Mamba enabled, the workflow fails with:
Failed to create Conda environment
command: mamba create --strict-channel-priority --mkdir --yes --quiet --prefix /home/ubuntu/hpc-home/PHORAGER_conda_cache/env-0778f084eefb971403fa5d40651c28a7 -c conda-forge -c bioconda -c defaults bioconda::phold=0.2.0
status : 109
message:
The following argument was not expected: --mkdir
Run with --help for more information.
Nextflow appears to be automatically adding the --mkdir
flag to mamba create commands, but this flag is not supported in current Mamba versions.
Workarounds tried:
- The pipeline works when I downgrade Mamba to an older version that supports the flag
- The pipeline works when using Conda instead of Mamba (
useMamba = false
)
Configuration: My conda config in nextflow.config:
conda {
enabled = true
useMamba = params.use_mamba
cacheDir = params.conda_cache_dir
createTimeout = params.conda_install_timeout
channels = ['conda-forge', 'bioconda', 'defaults']
createOptions = '--strict-channel-priority'
}
Questions:
- Is there a way to prevent Nextflow from adding the
--mkdir
flag to mamba commands? I must be doing something wrong, but I am unsure how to go about it. - Are there any configuration options I can add to fix this without downgrading mamba or reverting to Conda?
Thank you for your assistance!