-
Notifications
You must be signed in to change notification settings - Fork 352
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
[anaconda] support ARM architecture and install latest version #943
base: main
Are you sure you want to change the base?
Conversation
r3dpoint
commented
Apr 13, 2024
- The anaconda installer is available for ARM and dev containers work on ARM; therefore, elaborate on architecture detection in the anaconda feature to support ARM.
- Update to default to latest version of anaconda.
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for contributing these changes, they look great.
Left some minor comments!
if [ "${architecture}" == "amd64" ]; then | ||
CONDA_ARCH="x86_64" | ||
elif [ "${architecture}" == "x86_64" ]; then | ||
CONDA_ARCH="x86_64" | ||
elif [ "${architecture}" == "arm64" ]; then | ||
CONDA_ARCH="aarch64" | ||
elif [ "${architecture}" == "aarch64" ]; then | ||
CONDA_ARCH="aarch64" | ||
else | ||
echo "(!) Architecture $architecture unsupported" | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ "${architecture}" == "amd64" ]; then | |
CONDA_ARCH="x86_64" | |
elif [ "${architecture}" == "x86_64" ]; then | |
CONDA_ARCH="x86_64" | |
elif [ "${architecture}" == "arm64" ]; then | |
CONDA_ARCH="aarch64" | |
elif [ "${architecture}" == "aarch64" ]; then | |
CONDA_ARCH="aarch64" | |
else | |
echo "(!) Architecture $architecture unsupported" | |
exit 1 | |
fi | |
case "${architecture}" in | |
amd64) architecture=x86_64 ;; | |
arm64) architecture=aarch64 ;; | |
*) | |
echo "Anaconda does not support machine architecture '$architecture'. Please use an x86-64 or ARM64 machine." | |
exit 1 | |
esac |
How about we simplify the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to implement though as i read your suggestion it accomplishes a different goal. the goal is to support amd64, x86_64, arm64, and aarch64. and in the case of amd64 use the x86_64 URL and in the case of the arm64 use the aarch64 URL. are you ok with preserving this goal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping to keep the goal in tact but didn't realize that we are using architecture="$(uname -m)"
to compute architecture
. Thanks for catching that!
How about we use 👇 instead? That way I believe it only returns amd64
of arm64
. Hence, we'd skip another conditions.
architecture=$(dpkg --print-architecture)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice that makes sense. i'll work up a commit.
fi | ||
|
||
su --login -c "export http_proxy=${http_proxy:-} && export https_proxy=${https_proxy:-} \ | ||
&& wget -q https://repo.anaconda.com/archive/Anaconda3-${CONDA_VERSION}-Linux-x86_64.sh -O /tmp/anaconda-install.sh \ | ||
&& wget -q https://repo.anaconda.com/archive/Anaconda3-${CONDA_VERSION}-Linux-${CONDA_ARCH}.sh -O /tmp/anaconda-install.sh \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&& wget -q https://repo.anaconda.com/archive/Anaconda3-${CONDA_VERSION}-Linux-${CONDA_ARCH}.sh -O /tmp/anaconda-install.sh \ | |
&& wget -q https://repo.anaconda.com/archive/Anaconda3-${CONDA_VERSION}-Linux-${architecture}.sh -O /tmp/anaconda-install.sh \ |