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

Add micromamba as a possible install tool and make it default on macOS and Windows #2075

Merged
merged 27 commits into from
Oct 16, 2024

Conversation

jaimergp
Copy link
Member

@jaimergp jaimergp commented Oct 3, 2024

Checklist

  • Added a news entry
  • Regenerated schema JSON if schema altered (python conda_smithy/schema.py)

Investigating performance improvements triggered by conversation at conda-forge/conda-forge.github.io#2323.

We can use micromamba to save some minutes, specially in Windows. To avoid installing Miniforge if possible, I scripted that too instead of hardcoding the logic in the CI workflow template. This opens the possibility of enabling build-locally.py on Windows, similar to macOS' approach.

Live tests available at conda-forge/dav1d-feedstock#21

@jaimergp jaimergp requested a review from a team as a code owner October 3, 2024 13:59
@beckermr
Copy link
Member

beckermr commented Oct 4, 2024

pre-commit.ci autofix

@beckermr
Copy link
Member

@conda-forge/core @jaimergp This one appears ready for review! Shall we merge?

@wolfv
Copy link
Member

wolfv commented Oct 14, 2024

Awesome stuff, really looking forward to shave off these minutes from Windows! :)

@jaimergp
Copy link
Member Author

We might need to change the D:\ stuff on Windows so it's configurable (see #2076 for reference). I was hoping to get that one reviewed/merged, then rebase this one to use the things added there.

@beckermr
Copy link
Member

Sounds good. We'll wait then.

@jaimergp
Copy link
Member Author

This is getting quite fast now for Windows, under a minute! conda-forge/dav1d-feedstock#21 (comment)

@beckermr
Copy link
Member

Lgtm. Merge when you are ready.

@jaimergp
Copy link
Member Author

The only rough edge here is that this doesn't affect Linux at all due to the Docker images. To benefit from micromamba there we would need to:

  • Build and publish micromamba images
  • Change the pinnings so the docker_images list refers to micromamba. Or maybe we post-process that by adding a clever mapping (e.g. prefixing everything with micromamba-).

Anyway, this is opt-in for now, so there's little risk.

@jaimergp
Copy link
Member Author

Btw, same PR but for staged-recipes: conda-forge/staged-recipes#27753

@beckermr
Copy link
Member

Why not set this as the default?

@jaimergp
Copy link
Member Author

To avoid the inconsistency between Linux and the rest, but in a way it's already inconsistent with Docker. We end up providing the same dependencies in the same base environment so I guess there's no point to be overly cautious. I'll flip the default and document this in the schema. Then folks can chime in if they have any thoughts.

@jaimergp jaimergp changed the title Add micromamba as a possible install tool Add micromamba as a possible install tool and make it default on macOS and Windows Oct 16, 2024
@beckermr beckermr merged commit 18a380a into conda-forge:main Oct 16, 2024
2 checks passed
@@ -40,11 +66,9 @@ export CONDA_SOLVER="{{ conda_solver }}"
export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1
{%- endif %}

{% if conda_install_tool in ("conda", "mamba") -%}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic should be flipped if conda_install_tool != 'micromamba'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm anticipating that the next install tool is a self-contained environment provider like pixi and not another conda-like client that is first provided by a Miniforge-like installation, that's why I went with "special casing" these two.

@isuruf
Copy link
Member

isuruf commented Oct 16, 2024

Build and publish micromamba images

We can just put micromamba into the existing images. Won't make a difference

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.

4 participants