Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use mamba in mulled-build #810

Merged
merged 1 commit into from
Oct 11, 2022
Merged

Conversation

mbargull
Copy link
Member

@mbargull mbargull commented Oct 9, 2022

With this little shell injection we can force mulled-build to invoke mamba install in place of conda install.
(It abuses the fact that --conda-version invokes a conda install conda={conda_version} in which we interject a conda->mamba aliasing right before the actual conda install for the target packages.)
This should only be taken as a possible temporary workaround that works with our current galaxy-lib dependency.

This now uses the existing involucro wrapper to inject a conda->mamba alias so mamba install is used in the container builds.

@dpryan79 suggested we could also add galaxyproject/galaxy#14770 (via https://github.com/johanneskoester/galaxy-lib/tree/feat/use-mamba ) as a patch to https://github.com/bioconda/bioconda-recipes/blob/master/recipes/galaxy-lib/meta.yaml . That would certainly be less hacky than this PR by changing

-    # We also inject a PREINSTALL to alias conda to mamba so `mamba install` is
-    # used instead of `conda install` in the container builds.
+    cmd += ['--use-mamba']

. To be able to use that proposed --use-mamba flag with such patch, we should also increase the version of galaxy-lib to 19.5.2.post1 or the like and then have galaxy-lib>=19.5.2.post1 in bioconda_utils-requirements.txt.
Or we just use this PR until galaxyproject/galaxy#14770 gets into a release and we update to use galaxy-tool-util instead of galaxy-lib.

@mbargull mbargull force-pushed the hack-mamba-in-mulled-build branch 2 times, most recently from dee156d to 5a07406 Compare October 9, 2022 14:34
@mbargull mbargull marked this pull request as ready for review October 9, 2022 20:05
bioconda_utils/pkg_test.py Outdated Show resolved Hide resolved
@mbargull mbargull changed the title fix: Hack mamba in mulled build fix: Use mamba in mulled-build Oct 9, 2022
@mbargull mbargull force-pushed the hack-mamba-in-mulled-build branch 2 times, most recently from aa5b4e7 to 912f8cc Compare October 9, 2022 22:27
@dpryan79
Copy link
Contributor

Since we'll want to update to galaxy-tool-util anyway then we might as well do that now.

@mbargull
Copy link
Member Author

Since we'll want to update to galaxy-tool-util anyway then we might as well do that now.

Yes, we could (we'd just have to test if everything still works correctly -- IDK if everything is covered by our tests; if yes, then great and we should be all set).
But that wouldn't change anything regarding the mulled-build/mamba-issue without galaxyproject/galaxy#14770 being merged/released.

N.B.: The current PREINSTALL override of this PR should work with galaxy-lib as well as galaxy-tool-util, i.e., merging this PR would resolve the current issue and would not pose any issue even if we'd update to galaxy-tool-util (with or without galaxyproject/galaxy#14770 ).

@mbargull
Copy link
Member Author

Trying out galaxy-tool-util in gh-813. (We could merge this PR before or after that one.)

@dpryan79 dpryan79 merged commit 554e15b into master Oct 11, 2022
@dpryan79 dpryan79 deleted the hack-mamba-in-mulled-build branch October 11, 2022 11:01
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.

None yet

2 participants