-
Notifications
You must be signed in to change notification settings - Fork 9
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
Upgrade to Conda Build 3 (finally) and Move to Azure DevOps #177
Conversation
This PR converts the `conda-build-all` script to be compatible with Conda Build 3 and Conda 4.4, using the API as much as I can. Its imperfect due to the imperfect API, but I think I managed to get what we need without high-maintenance work arounds. In theory, this should make the conda-build all script much more stable and we can switch back to using the `conda-forge` docker image as a base after some iterations We've kicked this can down the road about as far as it can go at this point so I think its time to implement a proper fix. All existing functionality should remain unchanged from how the script is used and invoked. Complete list of everything I tweaked: * Simplify imports to minimal set * Import only from the Conda(-build) API when possible * Added docstrings everywhere * Use metapackage functions directly instead of reading from various metapackage dicts * Reduce calls to the CLI directly where possible, replacing with API * Convert previous multi-python multi-numpy build-mixing to Conda Build 3 Variant system * Variants compiled from command line, still supports `--python` and `--numpy` * Build enumeration automatically checks for duplications * Still uses old package string styles instead of hashed dependencies for checking if package already on Anaconda (Will need to convert at some point) * Adds ability to check if package is already built locally, and can be overridden with `--rebuild` * Preserved checking against specific channels, both at command line and meta.yaml level * Package building handled by API instead of CLI * Functions more generalized to allow importing the conda-build-all script if need be * Switched all print statements to the Python 3 `.format()` mini-language over `%` formatting * Minimized amount of excess data passed between functions, handled mostly by Metadata now * Added ability for built and uploaded tarballs to be removed to save build space (e.g. Travis-CI) through the `-c` or `--clean` command line arg. This is False by default (related: omnia-md/conda-recipes#877) * Unpinned the conda and conda-build versions from the scripts. Will need to make changes to the Docker Image though Related issues: omnia-md/conda-recipes#799 Potentially resolved issues from these changes: * omnia-md/conda-recipes#712 * omnia-md/conda-recipes#403 (not likely, but something to consider)
Fix clashes Fix Travis Time to try!
After a bunch of shenanigans later, I think its finally ready
why.. why did that close it? It should stay open |
@jaimergp Continuing our conversation (this is just copy from the slack):
There is one problem I see with this is that we will still need to build a osx version since the current setup I have is OpenMM building only on CUDA images/installs. |
To that end, we will need to figure out a build string for OpenMM which works with or without the |
Can we use |
Sure, I just need to figure out the Jinja, and we still need to make sure that when someone does |
here is the syntax I assembled:
Can then use: |
Do we want to add the package hash ( |
My first thought is "no" for the reason that I explicitly did not want to re-build existing packages which don't need an update. The "Does the package need to be built" checks the output tarball name against the one on the Conda CDN's and skips unless forced. This worked until Conda-build started hashing the dependency pinning in Conda-Build 3.something. To keep that behavior, I intentionally added the However, since we are now dropping 2.7, we need to build for 3.8, and I'm pretty sure most of the 3.7 builds are missing anyways, it may be worth dropping that and letting packages build with the hashes now once again. We would still have to manually add it to the tl;dr: maybe the answer should be "yes?" Thoughts? |
Apologies for not being able to review this earlier! Reviewing this now, since it looks we need to put this into production. |
Actually, @jaimergp and I will meet about this tomorrow morning and should be able to review this then! |
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.
@Lnaden : Thanks so much for doing this! @jaimergp have gone through this.
Here is a summary of our discussion for consideration in future updates:
- Supported Python versions:
conda-forge
currently officially supports Python 2.7, 3.6 and 3.7, so we should try to support these if possible. They do have a bot adding 3.8 support, so we should add that as well. I'm certainly in favor of dropping Python 2.7 ASAP, but it would be best if we can keep in sync with what conda-forge supports. - Azure Devops vs GitHub Actions: Once the MolSSI CMS Cookiecutter is updated to use GitHub Actions, it would be useful to migrate from Azure Devops to GitHub Actions so that it is easier for folks to just deeply understand one continuous integration system.
- TeXLive: We stopped building the docs a little while ago, but it's great if we can continue to have TeXLive in our images if we can resurrect the docs building in the recipe (or a separate package). If we can't get it to work, we can likely drop TeXLive from our images.
- BINSTAR_TOKEN: Since this is active under your Azure account, you'll need to pull the current token from https://anaconda.org/omnia-dev/settings/profile (where you are an owner of
omnia-dev
no). When we change this to GitHub Actions later, we can see if there is some sort of institutional account we can use. - Build strings: I like having a
nocuda
label for variants that do not have CUDA support built in, though there should always be a default package with the latest CUDA (if available) onmain
. There's also no point innocuda
forosx
if we're not building CUDA variants. - Windows builds: I am super excited to have CUDA builds for Windows!
- Updating with conda-forge: There are a mess of
~/.conda_configs/
files that appear to have been generated with the conda-forge tooling, but how do we update these going forward to stay in sync with the conda-forge infrastructure? Any thoughts on how we make this sustainable? - conda-build-all: Is this script something we should make external, or try to harmonize with the
build_all.py
from conda-forge, or the CI build infrastructure in its entirety?
@jaimergp will work with you on updating the openmm
recipe to bring it into alignment with the conda-forge recipe in the areas where this is needed.
Overall, this is great, and we can merge and move forward with iterative improvements!
The official end of support date for Python 2.7 is in less than a month, so I don't think it's worth putting in any effort to try to support it. Also, the next OpenMM release will not support Python 2. |
I'll leave this resource here for future reference. IBM provides packages for https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/#/ More info: conda-forge/openmm-feedstock#8 (comment) |
One more thing, maybe for a separate PR: PowerPC builds. Nvidia provides base images here. Do we want to include these builds here too? |
Yes, but Python 2.7 dies on Jan 1 2020, by the time we get all this hammered out, we may as well just not support it. They are also working on phasing out 3.6 and once 3.8 is stable on their builds, 3.6 will drop. I would not say they are supporting 3.6 as much as they are phasing it out. They could drop it any day as far as I know.
That is something we can hash after getting the build system upgraded first, one thing at a time.
I would love to drop this, it adds a fair amount of complexity to the image since I have to build a parallel glibc for the newer (2018+) TeXLives to support.
Its under my azure account so I could test without spamming everyone while I tried a bunch of things and in case it did not work. My plan was to merge this in, and then create a group Azure account which all Omnia devs have full control over. So hopefully we can resolve this without having to move the binstar token between owners.
This is something I'm not sure how to best handle. I don't know how to make it so when someone does
There are a bunch of them, but I wrote most of them. They are just simple YAML dicts with 1 or 2 options. I have a generator script I have added in a recent change locally I will be pushing.
I would be very, very careful on how much extra work to put into this. I tried to make this so that it pays the technical debt we have accrued over the years while requiring minimal maintenance in the future (hence why I try to use the Conda Build API everywhere I can). Staged recipes is a very special repo from Conda-Forge and I am very weary of trying to mimic conda-forge's build system because it makes alot of assumptions we don't (channel rigidity, build images, etc) and has a bunch of active devs which we cannot commit in equal parts. Overall, I am going to make some changes on my end, and work with @jaimergp to get OpenMM building on my local builds (to at least ensure it works), then we can move forward with merging, tweaking, and fixing. Sound good? |
Add a generator script to the YAML configs Re-add Python 3.6 Block PyCharm .idea's folder from being added to git
@Lnaden @jaimergp: Happy New Year, and welcome back from the holidays! We desperately need to complete the refurbishment of our omnia build infrastructure, get nightly builds working again, and release the conda-forge version of OpenMM. What else needs to be done here, and is there any way I can help? |
(Notably, we haven't pushed an |
I am happy to take over whenever @Lnaden gives the OK! |
I think it might be best to hand it off. I'm not sure when I can finish this in the short term. @jaimergp do you want to have another chat later today or tomorrow afternoon and we can go over all the changes/mechanisms this will introduce as well as what needs done to finish it? |
@jaimergp, I have made some last changes to this, I think its ready to be merged in. It will merge to conda-build3-v2 for a branch instead of master, so you should be able to take control of it from there. I am getting the Azure DevOps org set up now |
@Lnaden LGTM! |
I might need admin access to this org too. |
@jaimergp I have added you to the maintainers for this repo, you should be able to to merging and whatnot after accepting! |
Do we need approval from Peter too or can I just merge this to the dev branch? |
Na, you can just merge this since its going to a branch called |
Awesome |
FYI, Peter hasn't been much involved in the conda build infrastructure, but has generously offered to help maintain it going forward. |
After a bunch of testing, this is the working (at least in dry runs) upgrade to the Omnia conda-build infrastructure. This replaces #154 and does the following things:
omniamd
Docker Group for linuxYou can see the output CI stuff here: https://dev.azure.com/lnaden/conda-dev-recipes/_build/results?buildId=72
Outstanding Issues
--dry-run
flag and have not adjusted the OpenMMbuild.sh
andbuild.bat
scripts.Theoretical Issue closures