Skip to content

Fix pixi Singularity template PATH environment#1036

Merged
munishchouhan merged 3 commits intomasterfrom
fix/pixi-singularity-path
Apr 27, 2026
Merged

Fix pixi Singularity template PATH environment#1036
munishchouhan merged 3 commits intomasterfrom
fix/pixi-singularity-path

Conversation

@munishchouhan
Copy link
Copy Markdown
Member

Summary

  • The conda/pixi:v1 Singularity template incorrectly referenced $MAMBA_ROOT_PREFIX (a micromamba-specific variable) in the %environment section. Since pixi never sets this variable, installed executables (e.g. fastqc, multiqc) were not found in $PATH.
  • Fixed by sourcing the pixi-generated /shell-hook.sh in %environment, which correctly activates the pixi environment (PATH, CONDA_PREFIX, etc.)
  • Removed the unnecessary exec "$@" append to /shell-hook.sh — this is a Docker entrypoint pattern that has no effect in Singularity containers.

Context

fixes #1035

Changes

  • singularityfile-conda-file.txt — Replaced export PATH="$MAMBA_ROOT_PREFIX/bin:$PATH" with . /shell-hook.sh and removed the unnecessary exec "$@" line
  • PixiHelperTest.groovy — Added assertions verifying shell-hook sourcing and no MAMBA_ROOT_PREFIX reference

Test plan

  • PixiHelperTest passes
  • Verified manually: fastqc found at /opt/wave/.pixi/envs/default/bin/fastqc inside a pixi-built Singularity container

…MBA_ROOT_PREFIX

The pixi Singularity template incorrectly referenced $MAMBA_ROOT_PREFIX (a micromamba variable)
in %environment, so installed executables were never found in $PATH. Fixed by sourcing the
pixi shell-hook script which sets the correct environment. Also removed the unnecessary
`exec "$@"` (Docker entrypoint pattern not used by Singularity).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@munishchouhan
Copy link
Copy Markdown
Member Author

tested locally:

% docker run --rm --privileged --platform linux/amd64 kaczmarj/apptainer exec oras://hrma017/fastqc:fastqc-0.12.1--f3e77eeaf62fa693 which fastqc                  
INFO:    Downloading oras image
/opt/wave/.pixi/envs/default/bin/fastqc

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@munishchouhan munishchouhan self-assigned this Apr 23, 2026
@munishchouhan munishchouhan merged commit a199953 into master Apr 27, 2026
7 checks passed
@munishchouhan munishchouhan deleted the fix/pixi-singularity-path branch April 27, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--build-template conda/pixi:v1 doesn't build multiqc or fastqc correctly

4 participants