diff --git a/scripts/persistent-conda-ebs/on-create.sh b/scripts/persistent-conda-ebs/on-create.sh index bedc610..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" @@ -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