refactor(anaconda): ♻️ refactor & update to 24.5.0 #1296
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.
I've supercharged the Anaconda DevContainer feature after dealing with numerous issues because of outdated versions and compatibility problems across different environments. So, I took some time to completely revamp this (for work reasons mainly), and thereby thought to contribute back here. The result might be more robust than necessary, but I've written it in a functional manner that makes it easy to edit if there are maintenance concerns.
A major addition is
mamba
support – a much faster package manager that's becoming standard across Anaconda deployments. Having it installed alongsideconda
gives users more options without any drawbacks. I personally prefer using Mamba now because environment setup takes significantly less time than before.I've introduced several new configuration options: users can now toggle
useCondaForge
for better package compatibility and more permissive licensing, control Mamba installation withinstallMamba
, configure system package manager usage viauseSystemPackages
, and choose between full Anaconda or minimalMiniconda
withinstallFullAnaconda
.I've also changed the default to
miniconda
since for our use-case it makes more sense and it manages to do most of what you need in most cases, also, it doesn't take 6+ mins to bootstrap on some machines. However, I can understand if we want to revert this back to installing full Anaconda by default. Either way, I've included both options.The installation script is now smarter, detecting which Linux distribution it's running on and adapting accordingly. I've added logging and created helpful aliases for frequently used commands.
I had some trouble using thedevcontainer
CLI tool, but the documentation has been completely revamped to showcase all these new features, and the test suite has been rebuilt to be more reliable across different environments.It should also now be updated to the latest version.
Update: I made a little project repo: https://github.com/ran-dall/devcontainer-features-anaconda