Skip to content

Move conda installation from deprecated DEBs to Miniconda installer#1619

Merged
Kaniska244 merged 4 commits intodevcontainers:mainfrom
Kaniska244:conda-upgrade
Apr 14, 2026
Merged

Move conda installation from deprecated DEBs to Miniconda installer#1619
Kaniska244 merged 4 commits intodevcontainers:mainfrom
Kaniska244:conda-upgrade

Conversation

@Kaniska244
Copy link
Copy Markdown
Contributor

@Kaniska244 Kaniska244 commented Apr 13, 2026

Ref #1583

Description

  • Fixes the failing universal image build in devcontainers/images repository.

  • The conda dev container feature is installing the latest available conda version in anaconda 24.5.0 but while installing any python library using conda upgrades conda to 26.3.1 which is incompatible with existing version of existing conda system python library pluggy.

  • Conda dev container feature's DEB packages are officially deprecated and the manual DEB download approach (introduced as a workaround for the APT SHA1 signature rejection) is not a supported installation method. This switches to the official Miniconda bash installer.

  • This current PR is an improvement on another PR which was work in progress.

Changes

src/conda/install.sh

  • Replaces the ~70-line manual DEB fetch/parse/install block with the official Miniconda3-latest-Linux-{arch}.sh installer run in batch mode (-b -p ${CONDA_DIR})
  • Expands architecture support from x86_64-only to x86_64 + aarch64 via a case statement mapping to MINICONDA_ARCH
  • For specific conda versions: installs latest Miniconda, then pins via conda install conda=VERSION with explicit error handling
  • CONDA_SCRIPT now uses ${CONDA_DIR} variable consistently
  • Towards the end of the end of the installation process accept terms of reference for conda.
# Before: parse Packages index, download .deb, apt-get install .deb (~70 lines)

# After:
MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-${MINICONDA_ARCH}.sh"
curl -fsSL --connect-timeout 10 --max-time 120 "${MINICONDA_URL}" -o "${MINICONDA_INSTALLER}"
bash "${MINICONDA_INSTALLER}" -b -p "${CONDA_DIR}"

# For specific versions:
"${CONDA_DIR}/bin/conda" install -y "conda=${VERSION}"

src/conda/devcontainer-feature.json

  • Updates version proposals from 4.11.0/4.12.0 to 24.11.3/24.7.1
  • Major version bump

Tests

  • scenarios.json: changes test version from 4.12.0latest (old versions are incompatible with modern Miniconda's bundled Python)
  • install_conda.sh: removes the hard-coded version grep, retains conda-forge channel validation
  • install_conda_package_after_upgrade.sh: A new test script to check installation of python libraries using different conda channels.
  • conda_channel_creation.sh: A new test script to check conda channel creation.

Checklist:

  • All checks are passed.

@Kaniska244 Kaniska244 marked this pull request as ready for review April 13, 2026 08:47
@Kaniska244 Kaniska244 requested a review from a team as a code owner April 13, 2026 08:47
@Kaniska244 Kaniska244 merged commit ac24137 into devcontainers:main Apr 14, 2026
12 checks passed
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.

2 participants