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

Backport Miniforge PRs #457

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.2.0",
"version": "25.2.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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "NVIDIA RAPIDS devcontainer build utilities",
"id": "rapids-build-utils",
"version": "25.2.8",
"version": "25.2.9",
"description": "A feature to install the RAPIDS devcontainer build utilities",
"containerEnv": {
"BASH_ENV": "/etc/bash.bash_env"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ make_conda_env() {
make_conda_env "${DEFAULT_CONDA_ENV:-rapids}" "$@" <&0;

# shellcheck disable=SC1090
. /etc/profile.d/*-mambaforge.sh;
. /etc/profile.d/*-miniforge.sh;
Loading