fix: make which available for R (bioconda) post-links in conda v2 builds#1070
Merged
Conversation
pditommaso
force-pushed
the
add-which-tool-conda-templates
branch
from
July 3, 2026 06:15
dc5be2e to
b520b25
Compare
which tool in conda micromamba-v2 and pixi templateswhich tool in conda micromamba-v2 and pixi builds
pditommaso
force-pushed
the
add-which-tool-conda-templates
branch
from
July 3, 2026 08:39
06d70d6 to
af83d37
Compare
which tool in conda micromamba-v2 and pixi buildswhich before user packages in conda v2 and pixi templates
which before user packages in conda v2 and pixi templateswhich available for R (bioconda) post-links in conda v2 builds
…uilds Conda containers with R/bioconductor packages built fine but failed at runtime with "there is no package called 'GenomeInfoDbData'". Root cause: bioconductor data packages install their payload via a conda post-link script that runs `R CMD INSTALL`, and bioconda `r-base` shells out to the absolute path /usr/bin/which during utils .onLoad (it ignores $PATH and $R_WHICH). The micromamba:2-amazon2023 build image has no /usr/bin/which, so R fails to start, the post-link fails, and the data package is silently not installed. The post-link failure is non-fatal to `micromamba install`, so the build produces a broken image. Fix: in the conda micromamba-v2 build stage (as root) symlink the conda `which` to /usr/bin/which before installing the user's packages, so bioconda post-link scripts can run R. Applied to all four v2 templates. The pixi templates also install `which` as a base package (their *-noble build image already provides a system which). The legacy micromamba v1 template is unaffected (Debian-based image ships which). Verified with real Docker builds on amazon2023: bioconductor-tximeta installs GenomeInfoDbData and the final image loads SummarizedExperiment and tximport. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pditommaso
force-pushed
the
add-which-tool-conda-templates
branch
from
July 3, 2026 15:00
9f2de82 to
153982a
Compare
munishchouhan
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Conda containers with R/bioconductor packages (e.g. the nf-core rnaseq
TXIMETA_TXIMPORTstep, which installsbioconductor-tximeta) build successfully but fail at runtime:Root cause
Bioconductor data packages (
GenomeInfoDbData, etc.) don't ship their payload in the conda package — a conda post-link script (post-link.sh→installBiocDataPackage.sh) downloads it and runsR CMD INSTALLat install time.That
R CMD INSTALLstarts an R session, and biocondar-baseshells out to/usr/bin/which(absolute path) duringutils.onLoad— it ignores$PATHand$R_WHICH. The v2 build imagemambaorg/micromamba:2-amazon2023has no/usr/bin/which, so R can't start, the post-link fails, and the data package is never installed. The post-link failure is non-fatal tomicromamba install, so the build "succeeds" and produces a broken image.This is why simply installing
conda-forge::whichinto/opt/conda/binwas not enough — R only looks at/usr/bin/which.Fix
In the conda micromamba-v2 build stage (as root), symlink the conda
whichto/usr/bin/whichbefore the user's packages are installed, so bioconda post-link scripts can run R:Applied to all four
conda-micromamba-v2templates (dockerfile + singularityfile, conda-file + conda-packages). The pixi templates also getwhichas a base package for consistency, though their*-noblebuild image already provides a systemwhich. The legacy micromamba v1 template is unaffected (its Debian-based image shipswhich).Verification
Reproduced and fixed locally with real Docker builds on
amazon2023:R CMD INSTALLpost-link fails (.onLoad failed ... error in running command),GenomeInfoDbDataabsent, runtime load fails.library(SummarizedExperiment); library(tximport)→ OK.Unit tests updated:
TemplateUtilsTest,ContainerHelperTest(+CondaHelperTest/PixiHelperTestcontains-checks) pass.Refs: https://community.seqera.io/t/which-is-missing-in-recent-seqera-containers/2718
🤖 Generated with Claude Code