-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[ci] use mamba
instead of conda
in macOS and Linux CI jobs
#6140
Conversation
conda
with mamba
in some CI jobsconda
with mamba
in some CI jobs
conda
with mamba
in some CI jobsconda
with mamba
in some CI jobs
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.
Thanks for this but simply changing conda
to mamba
everywhere you find it is not going to work in this project's CI. Most of the Linux ***
jobs running on Azure Devops are failing, for example, with an error like this:
/__w/1/s/.ci/test.sh: line 131: mamba: command not found
Because they run in a container whose image is published from here: https://github.com/guolinke/lightgbm-ci-docker/tree/9121c2852e1cbbc556f12b4ba70b335989e0d9b4/dockers/ubuntu-14.04
And that image does not have mamba
in it.
If you want to make this change, you'll have to install mamba
in those images, and make other changes similar to those in #4953.
@jameslamb yep, realized that already. The second paragraph of my description describes what I now wanted to do instead, will implement in the next couple minutes. |
conda
with mamba
in some CI jobsmamba
instead of conda
in CI jobs
@jameslamb I also tried to build Docker containers in https://github.com/guolinke/lightgbm-ci-docker. However, I completely fail to do so on an AWS-hosted Linux machine and it also seems to be flaky in the GitHub CI. How do you build these images locally? |
Please be specific about the issues you're encountering (logs? error messages?) and I will try to help. |
Issues in the CI are visible here: https://github.com/borchero/lightgbm-ci-docker/actions/runs/6502543755. Issues on AWS were similar. I got a little farther with some adjustments but failed to install PoCL due to an In any case, would it be able to merge this PR regardless? It would at least fix some issue |
No, it is still not passing. The latest In addition, I'm concerned...where is We try in this project to not rely on the things that come pre-installed in the VM images from CI providers, as those can change without our knowledge and in some cases can go without updates for an unacceptably long time. I'd expected to see a PR that adds the use of Lines 127 to 133 in 8ed371c
Lines 137 to 139 in 8ed371c
Can you please add something like that and update env variables Also, since you're pursuing this in support of #6034... could you consider other approaches to try to get that environment with Please note that I'll have very limited availability for the next week, so I personally won't be able to provide thorough reviews for this or #6034 for the next 8 days or so. |
I think that this is a general issue of the current CI setup 👀 I wouldn't know how this is connected to changes in this PR and I would expect it to fail (non-deterministically) in other PRs as well 😬
Since July 2023, Miniforge includes
I can give this a try but it feels like a band-aid solution that is likely to break easily in the future. |
Oh very cool, did not know that! Thanks very much for the links. Given that, I definitely support this PR. I think it's ok to mix
I definitely agree that having to provide hints like this shouldn't be necessary in the presence of well-formed package metadata for all of the things we install from So my proposal is this:
|
That hasn't been too successful, unfortunately :/
Given that, do you think we can just rebuild the images in https://github.com/guolinke/lightgbm-ci-docker without making any changes to the Dockerfile? That would give us |
good idea! It's been a while since that was done, I just put up guolinke/lightgbm-ci-docker#30 to make some changes that'll hopefully make that a bit easier to do. |
Nice! Let me know once new images are used in the Azure CI 😄 |
The new images built successfully!
(the failed ubuntu-14.04 job isn't relevant... we don't use that image any more. I'll remove that task + Dockerfile entirely) So I just pushed 7e2114b, switching this PR back to using Hopefully it helps 🤞🏻 |
Looks to me like that worked! https://dev.azure.com/lightgbm-ci/lightgbm-ci/_build/results?buildId=15335&view=logs&j=02a2c3ba-81f8-54e3-0767-5d5adbb0daa9 As of this branch, LightGBM's CI would now use Hopefully that'll help with with #6034, and with development in the repo in general. The builds all look a few minutes faster than the last build on @jmoralez since I pushed commits here, I don't want to approve and merge it. Could you help with a review? |
dismissing to wait for another reviewer, since I pushed changes here
mamba
instead of conda
in CI jobsmamba
instead of conda
in macOS and Linux CI jobs
@jameslamb awesome! Glad to see that this helped, hope it gets rid of the CI failures in #6034 🙏🏼 |
Hey y'all, conda maintainer here, in case you want to use mamba's solver without switching to the mamba CLI, you might also want to switch to the integration into conda called conda-libmamba-solver, that the community worked on a for a while. It's already installed by default by recent miniconda/miniforge installers and can be enabled by setting Very soon® we'll even switch the default solver used by conda to using that, see all the details of our rollout in our blog post from earlier this year. |
Thanks so much for the links @jezdez ! I was aware that you the For us here in this project's testing jobs, what are the benefits of keeping the If the only benefit is "you don't have to update your scripts", then I think I'd still prefer the switch to the |
I'm going to merge this so @borchero can keep making progress, but it's easily reversible so @jezdez whenever you have time I'd be very interested to hear your answer to #6140 (comment). |
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Motivation
In #6034, the Python package
bdist
build on macOS times out after an hour as the environment for testing cannot be solved in time. This is the result from using conda with its slow solver. Replacingconda
withmamba
causes the same CI job to complete successfully in under 20 minutes.This PR allows to optionally use
mamba
rather thanconda
to allow certain CI jobs to take advantage ofmamba
's faster solver. The optional usage alleviates the need to build new docker images for the CI for the time being.