-
Notifications
You must be signed in to change notification settings - Fork 441
refactor(anaconda): ♻️ refactor & update to 24.5.0 #1296
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
base: main
Are you sure you want to change the base?
Conversation
bb72c1b
to
b4f1bb2
Compare
This commit completely overhauls the Anaconda DevContainer feature to address outdated containers and compatibility issues across different environments. I've added Mamba support, which provides significantly faster package management alongside traditional Conda. The installation script now detects and adapts to various Linux distributions, making it more robust across platforms.
b4f1bb2
to
75a2350
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @ran-dall ,
Thank you for the contribution. I have left a few comments & also please resolve the conflict. Kindly let me know in case of any clarification required on the same.
With Regards,
Kaniska
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason why we need this devcontainer-feature.json
inside the test folder? We shouldn’t normally need this here. Could this be removed please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ubuntu focal version is reaching EOL on 31st May 2025. Would you kindly change the "image"
tag for the relevant test cases to ubuntu:noble
& ubuntu:jammy
.
Also as per this change I believe we intend to open up this anaconda feature for RHEL based linux distributions. In that case, would it be possible to add test cases based on RHEL based other popular open source linux distributions such as almalinux
, rocky
& centos
.
@@ -7,7 +7,7 @@ | |||
|
|||
```json | |||
"features": { | |||
"ghcr.io/devcontainers/features/anaconda:1": {} | |||
"ghcr.io/ran-dall/devcontainer-features/anaconda:1": {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly change this OCI reference back to to the official one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add the following steps or something similar at the end of the test scripts wherever conda installation is applicable, to see if the user has write permission in the conda installation directory.
check "conda-update-conda" bash -c "conda update -y conda"
check "conda-install-tensorflow" bash -c "conda create --name test-env -c conda-forge --yes tensorflow"
check "conda-install-pytorch" bash -c "conda create --name test-env -c conda-forge --yes pytorch"
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