From f3cdf047f4926adc94302c89bb87fef48bb56777 Mon Sep 17 00:00:00 2001 From: Sebastian Nichtern <18186962+BastiQ@users.noreply.github.com> Date: Thu, 28 Mar 2024 23:28:01 +0100 Subject: [PATCH 1/2] Adding conda-forge as first conda channel, to ensure installation of Python 3.12 works --- scripts/persistent-conda-ebs/on-create.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/persistent-conda-ebs/on-create.sh b/scripts/persistent-conda-ebs/on-create.sh index bedc610..15a1d6a 100644 --- a/scripts/persistent-conda-ebs/on-create.sh +++ b/scripts/persistent-conda-ebs/on-create.sh @@ -28,8 +28,11 @@ source "$WORKING_DIR/miniconda/bin/activate" KERNEL_NAME="custom_python" PYTHON="3.6" +echo "INFO: Creating new conda environment with name $KERNEL_NAME and Python version $PYTHON" +conda config --prepend channels conda-forge conda create --yes --name "$KERNEL_NAME" python="$PYTHON" conda activate "$KERNEL_NAME" +echo "INFO: Python version: `python --version`" pip install --quiet ipykernel From 6b92878711912f63957be06bdc93b4034c1073a0 Mon Sep 17 00:00:00 2001 From: Sebastian Nichtern <18186962+BastiQ@users.noreply.github.com> Date: Thu, 28 Mar 2024 23:31:51 +0100 Subject: [PATCH 2/2] Moving from fixed to latest miniconda version --- scripts/persistent-conda-ebs/on-create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/persistent-conda-ebs/on-create.sh b/scripts/persistent-conda-ebs/on-create.sh index 15a1d6a..55275cb 100644 --- a/scripts/persistent-conda-ebs/on-create.sh +++ b/scripts/persistent-conda-ebs/on-create.sh @@ -18,7 +18,7 @@ unset SUDO_UID # Install a separate conda installation via Miniconda WORKING_DIR=/home/ec2-user/SageMaker/custom-miniconda mkdir -p "$WORKING_DIR" -wget https://repo.anaconda.com/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh -O "$WORKING_DIR/miniconda.sh" +wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O "$WORKING_DIR/miniconda.sh" bash "$WORKING_DIR/miniconda.sh" -b -u -p "$WORKING_DIR/miniconda" rm -rf "$WORKING_DIR/miniconda.sh"