Skip to content

Add mamba and conda-libmamba-solver to Miniforge (Mambaforge is now identical)#277

Merged
hmaarrfk merged 7 commits into
conda-forge:mainfrom
isuruf:4.12.0
Aug 20, 2023
Merged

Add mamba and conda-libmamba-solver to Miniforge (Mambaforge is now identical)#277
hmaarrfk merged 7 commits into
conda-forge:mainfrom
isuruf:4.12.0

Conversation

@isuruf

@isuruf isuruf commented Mar 21, 2022

Copy link
Copy Markdown
Member

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@isuruf
isuruf requested a review from a team as a code owner March 21, 2022 19:37
@isuruf

isuruf commented Mar 21, 2022

Copy link
Copy Markdown
Member Author

cc @jaimergp, @jezdez, @wolfv

Comment thread scripts/build.sh Outdated
if [[ "${TARGET_PLATFORM}" == win-* ]]; then
conda install -y "nsis=3.01" -c conda-forge --override-channels
fi
pip install git+git://github.com/chrisburr/constructor@64ebd6d34f0f18684c76c0bebcfab41c38d55083#egg=constructor --force --no-deps

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is probably why the last tag was failing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we merge conda-forge/constructor-feedstock#61 we don't need this pip install override, right?

Comment thread Miniforge3/construct.yaml Outdated
{% if name.startswith("Mambaforge") %}
- mamba 0.22.1
{% else %}
- conda-libmamba-solver 22.3.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will pull libmambapy plus its deps so I wonder if just the presence of mamba as a command is enough to justify the existence of Mambaforge. Like, if we merge, Miniforge and Mambaforge are almost the same. IIRC, Mambaforge was provided separately because it shipped more deps.

Comment thread scripts/build.sh Outdated
conda install -y "nsis=3.01" -c conda-forge --override-channels
fi
pip install git+git://github.com/chrisburr/constructor@64ebd6d34f0f18684c76c0bebcfab41c38d55083#egg=constructor --force --no-deps
pip install git+https://github.com/conda/constructor@3.3.1#egg=constructor --force --no-deps

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

conda-forge/constructor-feedstock#61 was merged, so we can remove this in a couple hours.

Suggested change
pip install git+https://github.com/conda/constructor@3.3.1#egg=constructor --force --no-deps

@jezdez jezdez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few notes on this:

Some context first: The new solver integration was released as a separate package as a means for users to "opt-in" into the experimental phase of the engineering effort, basically for us to be able to collect feedback from real world environments. The goal is to gain the confidence that our integration layer with libmamba indeed works as closely as possible to conda's default solver. It's not just a straight port of libmamba but does extra steps to be closer to what users expect from conda. The extra installation step was a design decision to make sure we're not accidentally cargo-cult the experimental solver into "production environments" such as conda-forge.

The miniconda 4.12.0 installer will not automatically install conda-libmamba-solver. It largely depends on the real world user feedback, but I'm expecting it to be added in the next release of miniconda at the end of Q2, start of Q3 time frame instead, when we hope to have finalized the experiment.

For conda-forge I would strongly suggest to wait for at least one or two bugfix releases before adding conda-libmamba-solver to miniforge, simply because it would make it easier for Jaime, Wolf and me to ship breaking changes in conda-libmamba-solver when they become necessary following user feedback.

Regarding mambaforge and how conda-libmamba-solver fits into this, I want to encourage us to think about this before we make decisions (like merging this PR here) before we regret it afterwards. mambaforge/miniforge and mamba are reasonable alternatives to miniconda and conda and I'd rather gain more experience with conda-libmamba-solver before we change the installers that a lot of users use.

The alternative to this PR right now is: conda install conda-libmamba-solver.

Could we maybe put this PR on hold for a bit?

@jezdez

jezdez commented Mar 23, 2022

Copy link
Copy Markdown
Member

I take the merging of #280 as a yes :) Thanks @isuruf!

@jakirkham

Copy link
Copy Markdown
Member

IIUC sounds like we are now good to include conda-libmamba-solver ( #284 (comment) )

Would we like to revitalize this PR or start a new one?

@jaimergp

Copy link
Copy Markdown
Member

@jakirkham - I added a comment on 284 to figure out how we want to move forward! Thanks for the reminder!

@jaimergp

Copy link
Copy Markdown
Member

Updated PR as discussed in #284.

Note that I am not copying the installers yet. The name of the installer, as taken by constructor will also determine the default install location, so some people might be expecting Mambaforge there.

I suggest we advertise this in the release notes and maybe in other channels (blog post, Twitter, Element, etc), and then change it to a copy in the next release or two.

@jaimergp jaimergp changed the title update to 4.12.0 and add conda-libmamba-solver Add mamba and conda-libmamba-solver to Miniforge (Mambaforge is now identical) Aug 10, 2023
@jaimergp

Copy link
Copy Markdown
Member

This is ready for review @conda-forge/miniforge. Thanks!

@jakirkham

Copy link
Copy Markdown
Member

FWIW LGTM. Thanks Jaime! 🙏

@jakirkham

Copy link
Copy Markdown
Member

@hmaarrfk could you please take a look?

@jakirkham
jakirkham requested a review from hmaarrfk August 10, 2023 16:36
@jakirkham

Copy link
Copy Markdown
Member

Friendly nudge @hmaarrfk 😉

@hmaarrfk

Copy link
Copy Markdown
Contributor

Sorry, trying to enable boa compatibility tests on miniforge too.

@hmaarrfk
hmaarrfk merged commit 7b6dc5f into conda-forge:main Aug 20, 2023
@jakirkham

Copy link
Copy Markdown
Member

Thanks everyone! 🙏

@hmaarrfk

Copy link
Copy Markdown
Contributor

Release is now out. Give it a try!

@jaimergp

Copy link
Copy Markdown
Member

Thanks Mark! Looks like it's gone live in macOS and Windows and no one has complained in Element yet :D I have sent a PR to change the base Miniforge install in our Linux Docker images at conda-forge/docker-images#239

I also updated the release description a bit to add a couple extra details. Hope that's ok!

@jakirkham

Copy link
Copy Markdown
Member

Noticed the tag is 23.3.1. Am wondering if it should be 23.8.0

Comment thread Miniforge3/construct.yaml
Comment on lines -33 to +35
{% endif %}
- conda {{ version.split("-")[0] }}
- conda-libmamba-solver {{ conda_libmamba_solver_version }}
- mamba {{ mamba_version }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah nvm looks like the version is tied to how Conda & friends are versioned. Submitted PR ( #480 ) to address this

humitos added a commit to readthedocs/readthedocs.org that referenced this pull request Jan 12, 2026
## Implementation Complete: Miniforge3 Support (Final)

This PR implements support for Miniforge3 as a replacement for the
deprecated Mambaforge in Read the Docs build tools, resolving issue
#11690.

### Summary of Changes:

✅ **1. Added Miniforge3 Version** (`constants_docker.py`)
- Added `miniforge3-25.11` → `miniforge3-25.11.0-1` (latest release)
- Added `miniforge3-latest` alias → points to `miniforge3-25.11`

✅ **2. Configuration Recognition** (`config.py`)
- Updated `python_interpreter` property to recognize `miniforge3` as
conda-based
- Now checks: `tool.version.startswith("miniconda") or
tool.version.startswith("miniforge")`

✅ **3. Installation Support** (`director.py`)
- No special handling needed - miniforge3 tools are pre-compiled
- Removed unnecessary environment variable unsetting code

✅ **4. Schema & Documentation**
- Updated `schema.json` with miniforge3 versions in Python enum
- Updated `v2.rst` documentation with miniforge3 options
- **Marked mambaforge versions as deprecated** in documentation

✅ **5. Comprehensive Test Coverage** (`test_config.py`)
- Test: conda key required for miniforge3 ✓
- Test: conda key not required with build.commands ✓
- Test: miniforge3 recognized as conda interpreter ✓
- Simplified test implementation per feedback
- All 294 config tests passing ✓

### Technical Implementation:

Miniforge3 support is straightforward because:
- Tools are pre-compiled and cached
- No special environment variable handling needed during installation
- Works the same as other conda-based Python versions

### Testing:

All changes have been thoroughly tested:
- ✅ 294 config tests passing
- ✅ No regressions in existing functionality
- ✅ Miniforge3 properly recognized as conda-based interpreter

### Feedback Addressed:

- ✅ Updated to miniforge3-25.11.0-1 (latest release)
- ✅ Marked mambaforge versions as deprecated in documentation
- ✅ Removed unnecessary environment variable handling
- ✅ Simplified test implementation

### Ready for Review

This implementation is minimal, focused, and follows the solution
outlined in the issue comments. It adds miniforge3 support while
maintaining full backward compatibility with existing mambaforge and
miniconda installations.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>


----

*This section details on the original issue you should resolve*

<issue_title>Build: retire Mambaforge (deprecated) and replace it with
Miniforge3</issue_title>
<issue_description>Hey folks, in the RTD [build tools for
Python](https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python)
all I can see is Mambaforge `mambaforge-latest` - but Mambaforge is
being sunsetted, and eventually, retired soon, you folks gonna offer us
a Miniforge3 container soon? Cheers muchly 🍺 </issue_description>

<agent_instructions>Note this _is_ the solution we want to implement:
https://github.com/readthedocs/readthedocs.org/issues/11690#issuecomment-2838545476</agent_instructions>

## Comments on the Issue (you are @copilot in this section)

<comments>
<comment_new><author>@stsewd</author><body>
From the repository https://github.com/conda-forge/miniforge

> As of July 2024, Mambaforge is deprecated. We suggest users switch to
Miniforge3 immediately. These installers will be retired from new
releases after January 2025. To assist in the migration, we will be
introducing rollowing brownouts to the latest Mambaforge installer.
Installers up to version 24.5.0-1 will not have any brownouts. 24.5.0-1
will include a warning message. Installers 2024.5.0-2 and later will
have the following brownout schedule:
> 
>     The installer will refuse to proceed every two weeks in October
>     The installer will refuse to proceed every ten days in November
>     The installer will refuse to proceed every five days in December
>     The installer will refuse to proceed in 2025+
> 
> Previous information:
> 
> With the
[release](https://github.com/conda-forge/miniforge/releases/tag/23.3.1-0)
of Miniforge3-23.3.1-0, that incorporated the changes in
conda-forge/miniforge#277, the packages and
configuration of Mambaforge and Miniforge3 are now identical. The only
difference between the two is the name of the installer and,
subsequently, the default installation directory.
> 
> We recommend switching to Miniforge3 immediately. These installers
will be retired in January 2025. To assist in the migration to
Miniforge3 for CI users, we've stopped the latest Mambaforge (24.5+)
installer from proceeding with following schedule
> 
>     Every two weeks in October
>     Every ten days in November
>     Every five days in December
>     Never in 2025</body></comment_new>
<comment_new><author>@humitos</author><body>
@valeriupredoi thanks for letting us know about it.

I suppose we should:

- notify all the projects using `miniconda3` and `mambaforge` warning
them they are deprecated
- write a blog post explaning this situation to share it with our users
- add `miniforge3` as an option for `build.tools.python`

I quickly check if `miniforge3` is supported on `asdf` and it seems it
is:

```
$ asdf list all python | grep miniforge3 | tail
miniforge3-23.1.0-1
miniforge3-23.1.0-2
miniforge3-23.1.0-3
miniforge3-23.1.0-4
miniforge3-23.3.0-0
miniforge3-23.3.1-0
miniforge3-23.3.1-1
miniforge3-23.10.0-0
miniforge3-23.11.0-0
miniforge3-24.3.0-0
```

Unfortunately, the work required for this is not trivial and there is a
lot of things to do. I'm not sure how we will prioritize
it.</body></comment_new>
<comment_new><author>@humitos</author><body>
I have one question here: is `miniconda3` the same as `miniforge3`? if
they are the same, should we only keep support for `miniconda3`? if they
are different, what are the differences?</body></comment_new>
<comment_new><author>@humitos</author><body>
OK, I understand they are the same with the difference where they
install packages from: `defaults` or `conda-forge` channels. I also
understand that most of our users are using an `environment.yaml` file
defining the `channels` key --which in the end it doesn't matter if the
underlying application is `miniconda3` or `miniforge3`.

If I'm correct here, I think that adding/keeping support for only one of
those is 👍🏼 and either one should be practically the
same.</body></comment_new>
<comment_new><author>@ericholscher</author><body>
Is it possible to use `build.jobs` to run the proper commands, and then
we just don't add support for the new version here? I'd like to avoid
the churn, and it seems like folks have been successfully using `uv`
with just `build.jobs.install` without us having to support anything?
</body></comment_new>
<comment_new><author>@humitos</author><body>
Yeah, I think people could use `build.jobs.pre_create_environment` to
install the version of Conda/Mamba they want doing the following:

```yaml
build:
  jobs:
    pre_create_environment:
      - asdf install python miniforge3-24.11.2-1
      - asdf global python miniforge3-24.11.2-1
```

I just checked that and it seems there is an issue in the miniforge3
installer, tho. It fails when installing via `asdf` with `
EnvironmentLocationNotFound: Not a conda environment:
/home/docs/checkouts/readthedocs.org/user_builds/...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #11690

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: humitos <244656+humitos@users.noreply.github.com>
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
Copilot AI added a commit to readthedocs/readthedocs.org that referenced this pull request Jan 29, 2026
## Implementation Complete: Miniforge3 Support (Final)

This PR implements support for Miniforge3 as a replacement for the
deprecated Mambaforge in Read the Docs build tools, resolving issue
#11690.

### Summary of Changes:

✅ **1. Added Miniforge3 Version** (`constants_docker.py`)
- Added `miniforge3-25.11` → `miniforge3-25.11.0-1` (latest release)
- Added `miniforge3-latest` alias → points to `miniforge3-25.11`

✅ **2. Configuration Recognition** (`config.py`)
- Updated `python_interpreter` property to recognize `miniforge3` as
conda-based
- Now checks: `tool.version.startswith("miniconda") or
tool.version.startswith("miniforge")`

✅ **3. Installation Support** (`director.py`)
- No special handling needed - miniforge3 tools are pre-compiled
- Removed unnecessary environment variable unsetting code

✅ **4. Schema & Documentation**
- Updated `schema.json` with miniforge3 versions in Python enum
- Updated `v2.rst` documentation with miniforge3 options
- **Marked mambaforge versions as deprecated** in documentation

✅ **5. Comprehensive Test Coverage** (`test_config.py`)
- Test: conda key required for miniforge3 ✓
- Test: conda key not required with build.commands ✓
- Test: miniforge3 recognized as conda interpreter ✓
- Simplified test implementation per feedback
- All 294 config tests passing ✓

### Technical Implementation:

Miniforge3 support is straightforward because:
- Tools are pre-compiled and cached
- No special environment variable handling needed during installation
- Works the same as other conda-based Python versions

### Testing:

All changes have been thoroughly tested:
- ✅ 294 config tests passing
- ✅ No regressions in existing functionality
- ✅ Miniforge3 properly recognized as conda-based interpreter

### Feedback Addressed:

- ✅ Updated to miniforge3-25.11.0-1 (latest release)
- ✅ Marked mambaforge versions as deprecated in documentation
- ✅ Removed unnecessary environment variable handling
- ✅ Simplified test implementation

### Ready for Review

This implementation is minimal, focused, and follows the solution
outlined in the issue comments. It adds miniforge3 support while
maintaining full backward compatibility with existing mambaforge and
miniconda installations.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>


----

*This section details on the original issue you should resolve*

<issue_title>Build: retire Mambaforge (deprecated) and replace it with
Miniforge3</issue_title>
<issue_description>Hey folks, in the RTD [build tools for
Python](https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python)
all I can see is Mambaforge `mambaforge-latest` - but Mambaforge is
being sunsetted, and eventually, retired soon, you folks gonna offer us
a Miniforge3 container soon? Cheers muchly 🍺 </issue_description>

<agent_instructions>Note this _is_ the solution we want to implement:
https://github.com/readthedocs/readthedocs.org/issues/11690#issuecomment-2838545476</agent_instructions>

## Comments on the Issue (you are @copilot in this section)

<comments>
<comment_new><author>@stsewd</author><body>
From the repository https://github.com/conda-forge/miniforge

> As of July 2024, Mambaforge is deprecated. We suggest users switch to
Miniforge3 immediately. These installers will be retired from new
releases after January 2025. To assist in the migration, we will be
introducing rollowing brownouts to the latest Mambaforge installer.
Installers up to version 24.5.0-1 will not have any brownouts. 24.5.0-1
will include a warning message. Installers 2024.5.0-2 and later will
have the following brownout schedule:
> 
>     The installer will refuse to proceed every two weeks in October
>     The installer will refuse to proceed every ten days in November
>     The installer will refuse to proceed every five days in December
>     The installer will refuse to proceed in 2025+
> 
> Previous information:
> 
> With the
[release](https://github.com/conda-forge/miniforge/releases/tag/23.3.1-0)
of Miniforge3-23.3.1-0, that incorporated the changes in
conda-forge/miniforge#277, the packages and
configuration of Mambaforge and Miniforge3 are now identical. The only
difference between the two is the name of the installer and,
subsequently, the default installation directory.
> 
> We recommend switching to Miniforge3 immediately. These installers
will be retired in January 2025. To assist in the migration to
Miniforge3 for CI users, we've stopped the latest Mambaforge (24.5+)
installer from proceeding with following schedule
> 
>     Every two weeks in October
>     Every ten days in November
>     Every five days in December
>     Never in 2025</body></comment_new>
<comment_new><author>@humitos</author><body>
@valeriupredoi thanks for letting us know about it.

I suppose we should:

- notify all the projects using `miniconda3` and `mambaforge` warning
them they are deprecated
- write a blog post explaning this situation to share it with our users
- add `miniforge3` as an option for `build.tools.python`

I quickly check if `miniforge3` is supported on `asdf` and it seems it
is:

```
$ asdf list all python | grep miniforge3 | tail
miniforge3-23.1.0-1
miniforge3-23.1.0-2
miniforge3-23.1.0-3
miniforge3-23.1.0-4
miniforge3-23.3.0-0
miniforge3-23.3.1-0
miniforge3-23.3.1-1
miniforge3-23.10.0-0
miniforge3-23.11.0-0
miniforge3-24.3.0-0
```

Unfortunately, the work required for this is not trivial and there is a
lot of things to do. I'm not sure how we will prioritize
it.</body></comment_new>
<comment_new><author>@humitos</author><body>
I have one question here: is `miniconda3` the same as `miniforge3`? if
they are the same, should we only keep support for `miniconda3`? if they
are different, what are the differences?</body></comment_new>
<comment_new><author>@humitos</author><body>
OK, I understand they are the same with the difference where they
install packages from: `defaults` or `conda-forge` channels. I also
understand that most of our users are using an `environment.yaml` file
defining the `channels` key --which in the end it doesn't matter if the
underlying application is `miniconda3` or `miniforge3`.

If I'm correct here, I think that adding/keeping support for only one of
those is 👍🏼 and either one should be practically the
same.</body></comment_new>
<comment_new><author>@ericholscher</author><body>
Is it possible to use `build.jobs` to run the proper commands, and then
we just don't add support for the new version here? I'd like to avoid
the churn, and it seems like folks have been successfully using `uv`
with just `build.jobs.install` without us having to support anything?
</body></comment_new>
<comment_new><author>@humitos</author><body>
Yeah, I think people could use `build.jobs.pre_create_environment` to
install the version of Conda/Mamba they want doing the following:

```yaml
build:
  jobs:
    pre_create_environment:
      - asdf install python miniforge3-24.11.2-1
      - asdf global python miniforge3-24.11.2-1
```

I just checked that and it seems there is an issue in the miniforge3
installer, tho. It fails when installing via `asdf` with `
EnvironmentLocationNotFound: Not a conda environment:
/home/docs/checkouts/readthedocs.org/user_builds/...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #11690

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: humitos <244656+humitos@users.noreply.github.com>
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
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.

5 participants