Skip to content

Commit

Permalink
Switch to miniforge (#448)
Browse files Browse the repository at this point in the history
[Mambaforge is
dead](https://conda-forge.org/news/2024/07/29/sunsetting-mambaforge/),
long live Miniforge!
  • Loading branch information
trxcllnt authored Jan 27, 2025
1 parent b19ae55 commit 7a09eb6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion features/src/mambaforge/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Mambaforge",
"id": "mambaforge",
"version": "25.4.0",
"version": "25.4.1",
"description": "A feature to install mambaforge",
"options": {
"version": {
Expand Down
17 changes: 8 additions & 9 deletions features/src/mambaforge/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env bash
set -e

MAMBAFORGE_VERSION="${VERSION:-latest}";
MINIFORGE_VERSION="${VERSION:-latest}";

# Ensure we're in this feature's directory during build
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
Expand All @@ -12,18 +12,17 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";

check_packages jq git wget bzip2 ca-certificates bash-completion;

echo "Downloading Mambaforge...";
echo "Downloading Miniforge...";

if [[ "$MAMBAFORGE_VERSION" == latest ]]; then
find_version_from_git_tags MAMBAFORGE_VERSION https://github.com/conda-forge/miniforge "tags/" "." "-[0-9]+" "true";
if [[ "$MINIFORGE_VERSION" == latest ]]; then
find_version_from_git_tags MINIFORGE_VERSION https://github.com/conda-forge/miniforge "tags/" "." "-[0-9]+" "true";
fi

wget --no-hsts -q -O /tmp/miniforge.sh \
"https://github.com/conda-forge/miniforge/releases/download/${MAMBAFORGE_VERSION}/Mambaforge-${MAMBAFORGE_VERSION}-Linux-$(uname -p).sh";
"https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${MINIFORGE_VERSION}-Linux-$(uname -p).sh";
echo "Installing Miniforge...";

echo "Installing Mambaforge...";

# Install Mambaforge
# Install Miniforge
rm -rf /opt/conda;
/bin/bash /tmp/miniforge.sh -b -p /opt/conda;

Expand Down Expand Up @@ -53,7 +52,7 @@ EOF
# export envvars in /etc/profile.d
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/$(($(ls -1q /etc/profile.d/*.sh | wc -l) + 20))-conda.sh;
ln -s /opt/conda/etc/profile.d/mamba.sh /etc/profile.d/$(($(ls -1q /etc/profile.d/*.sh | wc -l) + 20))-mamba.sh;
add_etc_profile_d_script mambaforge "$(cat .bashrc)";
add_etc_profile_d_script miniforge "$(cat .bashrc)";

# Update the devcontainers/features/common-utils __bash_prompt fn
# to insert ${CONDA_PROMPT_MODIFIER} into the dev container's PS1
Expand Down

0 comments on commit 7a09eb6

Please sign in to comment.