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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from Miniconda to Miniforge #1189

Merged
merged 9 commits into from
Nov 29, 2020
Merged

Conversation

romainx
Copy link
Collaborator

@romainx romainx commented Nov 13, 2020

Hello,

I'm trying to perform a structuring change by switching from Miniconda installer to Miniforge.

This repository holds a minimal installer for conda specific to conda-forge.

Here are the main reasons

  • Switch to open source since Anaconda has recently updated its TOS to restrict commercial usage of its repositories (including the repo hosting Miniconda installers) -> This could impact users of Jupyter Docker images
  • It's built to use conda-forge channel by default
    • it is the channel we are using that is not restricted
    • there is no need to prepend it anymore
    • other default channels that are concerned by the new TOS are not configured
  • Support various CPU architecture (installer can be adapted through ARGS), could be a good asset to build multi-arch images.
  • Support for pypy by using alternative installers Miniforge-pypy3 (thanks @mathbunnyru)

Some minor pros

  • There is almost no change in the installation process
  • Base image size seems to identical or slightly reduced
  • Speed up the package dependencies resolution (only one channel)

Implementation

  • Installation is pretty much the same 馃槉
  • Split the installer definition in several ARGs to ease overriding and for better clarity (I hope)
  • Removed the environment variable MINICONDA_VERSION because I'm not sure it makes sense to replace it by the Miniforge equivalent
  • Removed the strict channel priority of the conda installer because
    • it is no more necessary with only one channel
    • it makes installation of packages from other channels (set by users) harder
  • Decision to keep the installer checksum as an ARG instead of downloading it for security reasons (@mathbunnyru suggestion)
  • Documented in "Common Features" the way to install packages from defaults channels

Notes on multi-arch images

Here is a table displaying the various CPU architecture available

Ubuntu Miniforge Miniconda
arm64 linux-aarch64 -
amd64 linux-x86_64 Linux-x86_64.sh
ppc64le linux-ppc64le Linux-ppc64le.sh

List of ubuntu:focal architectures

curl -s https://hub.docker.com/v2/repositories/library/ubuntu/tags | \
    jq -r '.results[] | select(.name=="focal") | .images[].architecture'

# arm64
# s390x
# amd64
# ppc64le
# arm

@romainx romainx marked this pull request as draft November 13, 2020 17:18
@romainx romainx added the type:Enhancement A proposed enhancement to the docker images label Nov 13, 2020
@romainx romainx requested a review from parente November 13, 2020 18:30
@romainx romainx marked this pull request as ready for review November 13, 2020 18:30
@mathbunnyru
Copy link
Member

mathbunnyru commented Nov 13, 2020

Another great advantage is an ability to use pypy - maybe someone wants it, because it might give good speed improvement.

@mathbunnyru
Copy link
Member

LGTM

@romainx romainx added the status:Ready to Merge PR reviewed, up-to-date, and ready to merge label Nov 24, 2020
Fix the CondaPackageHelper to handle cases when conda spec is expressed with two `=` signs instead of a single one.
Copy link
Member

@parente parente left a comment

Choose a reason for hiding this comment

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

This also looks very good to me, @romainx. Thanks for staying on top of conda developments. Merging now. We can deal with issues as they arise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:Ready to Merge PR reviewed, up-to-date, and ready to merge type:Enhancement A proposed enhancement to the docker images
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants