Fix build error with --build-template conda/micromamba:v2 for singularity #972
Conversation
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
pditommaso
left a comment
There was a problem hiding this comment.
is there any tar options that could provide an alternative solution? bit concerned about shallowing stderr in case of error (and returning
I tired multiple flags but no luck This error could be because of proot |
|
because even i make a workaround where we just ignore this exception, may lead to brocker env |
|
and not using tar also decreases the build time |
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
…icromambav2-for-singularity
|
@pditommaso should we make it single stage build for singularity or keep the multi stage build which is giving error because of proot? |
…icromambav2-for-singularity
|
Sorry I was missing this, the solution suggest is it really needed to change the build structure? |
Apologies, I havenot changed the PR summary, its for the old solution, where we ignore atr errors So I suggested single build, I will update the pr summary |
|
@pditommaso I have updated the pr summary |
Closes #971
Problem
Singularity builds using --build-template conda/micromamba:v2 (and conda-pixi-v1) fail with tar permission errors during the multi-stage build process. The error occurs in the
second stage when extracting the conda environment archive:
tar: conda/conda-meta: Cannot change mode to rwxrwxrwx: No such file or directory
Similar errors cascade across multiple directories (pkgs/cache, fortomp, etc.), making the build unusable.
Root Cause
The Singularity templates for conda-micromamba-v2 and conda-pixi-v1 used a two-stage build pattern:
The tar extraction in the final stage failed because:
Solution
Convert both Singularity templates from multi-stage to single-stage builds. The conda/pixi environment is installed directly in the single stage — no tar archiving or extraction
needed.