Apptainer/Singularity equivalent to MAMBA_DOCKERFILE_ACTIVATE for automatic env activation #622
nick-youngblut
started this conversation in
Ideas
Replies: 1 comment
-
Hi @nick-youngblut - thanks for the feedback. We are aware that Apptainer/Singularity support isn't great. In my previous job I was doing pipeline development in an HPC environment that used Apptainer. I spent a significant amount of time investigating better ways of supporting Apptainer/Singularity, some of which you can see in old issues (#155). I'm not an expert on Apptainer internals, so there very well could be an approach I missed. I'm open to specific implementation ideas on how to better support Apptainer, but at this point someone else is going to have to provide some new insight before I can personally move this foward. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background & motivation
When we build Docker images from mambaorg/micromamba, we can ensure that the Conda environment is active inside every RUN layer simply by adding
In Apptainer/Singularity-based workflows, the situation is different:
For multi-stage pipelines (e.g. Nextflow) that support Conda, Docker and Apptainer, it would be very convenient to have a single Dockerfile that “just works” everywhere. Right now the lack of an Apptainer analogue to MAMBA_DOCKERFILE_ACTIVATE means the image behaves differently depending on the runtime, and tooling that shells into the container (CI jobs, apptainer exec … python ..., etc.) fails because the environment isn’t on PATH. 
Feature idea / questions
MAMBA_APPTAINER_ACTIVATE=1
that injects the same activation shim Apptainer-side during build time?_apptainer_shell.sh
script be invoked automatically when apptainer exec detects the container was built from a micromamba image?Minimal reproduction
Beta Was this translation helpful? Give feedback.
All reactions