Skip to content

Commit

Permalink
Use python build in to download mini-forge.
Browse files Browse the repository at this point in the history
  • Loading branch information
antarcticrainforest committed Feb 26, 2025
1 parent 24db973 commit 1ab0e49
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions freva-data-portal-worker/data-loader
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,13 @@ if [ "$create" = true ]; then
echo "Setting up miniconda:"
rm -rf ${MAMBA_DIR}
ARCH=$(uname -m)
SYSTEM=$(uname -s)
CWD=$(readlink -f $(dirname $0))
TEMP_DIR=$(mktemp -d)
cd "$TEMP_DIR" || { echo "Failed to create temporary directory"; exit 1; }

case "$ARCH" in
x86_64)
curl -s https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o conda.sh
;;
aarch64)
curl -s https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -o conda.sh
;;
ppc64le)
curl -s https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-ppc64le.sh -o conda.sh
;;
armv7l)
curl -s https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-armv7l.sh -o conda.sh
;;
*)
echo "Unsupported architecture: $ARCH"
exit 1
;;
esac

URL_PREFIX="https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3"
echo Downloading miniforge from ${URL_PREFIX}
python -c "from urllib.request import urlretrieve; urlretrieve('${URL_PREFIX}-${SYSTEM}-${ARCH}.sh', filename='conda.sh')"
/bin/sh conda.sh -b -u -f -p ${MAMBA_DIR}
${MAMBA_DIR}/bin/conda install -c conda-forge -y $PKGS
echo $MD5SUM > ${MAMBA_DIR}/environment.txt
Expand Down

0 comments on commit 1ab0e49

Please sign in to comment.