From 74eaf76dfda7d04fd1a8d8b2c6889bc0a950194d Mon Sep 17 00:00:00 2001 From: Ankita Victor Date: Thu, 8 Feb 2024 20:35:49 +0530 Subject: [PATCH 1/2] Check architecture for conda --- scripts/setup-ubuntu.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index 14ac9f144b91..70578d299fed 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -114,9 +114,19 @@ function install_fbthrift { function install_conda { mkdir -p conda && cd conda - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + ARCH=$(uname -m) + + if [ "$ARCH" == "x86_64" ]; then + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + elif [ "$ARCH" == "aarch64" ]; then + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh + else + echo "Unsupported architecture: $ARCH" + exit 1 + fi + MINICONDA_PATH=/opt/miniconda-for-velox - bash Miniconda3-latest-Linux-x86_64.sh -b -p $MINICONDA_PATH + bash Miniconda3-latest-Linux-$ARCH.sh -b -p $MINICONDA_PATH } function install_velox_deps { From 0089cc18b0207f647f964247148e80ef78846660 Mon Sep 17 00:00:00 2001 From: Ankita Victor Date: Tue, 13 Feb 2024 11:04:10 +0530 Subject: [PATCH 2/2] Merge x86_64 and aarch64 --- scripts/setup-ubuntu.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index 70578d299fed..b43cf502b633 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -116,19 +116,18 @@ function install_conda { mkdir -p conda && cd conda ARCH=$(uname -m) - if [ "$ARCH" == "x86_64" ]; then - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh - elif [ "$ARCH" == "aarch64" ]; then - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh - else + if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "aarch64" ]; then echo "Unsupported architecture: $ARCH" exit 1 fi + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-$ARCH.sh + MINICONDA_PATH=/opt/miniconda-for-velox bash Miniconda3-latest-Linux-$ARCH.sh -b -p $MINICONDA_PATH } + function install_velox_deps { run_and_time install_folly run_and_time install_fizz