From 8715349b3ffbb67a9cf7054491da6f3296d62e75 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Sat, 12 Aug 2023 00:37:59 +0000 Subject: [PATCH] Fix `install_conda.sh` By pinning conda version to 23.5.2 as latest(23.7.2 at this time) does not have a compatible version of `git` packages Fixes https://github.com/pytorch/builder/issues/1473 --- common/install_conda.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/common/install_conda.sh b/common/install_conda.sh index bd0607525..6ae978f05 100644 --- a/common/install_conda.sh +++ b/common/install_conda.sh @@ -3,13 +3,18 @@ set -ex # Anaconda -wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -chmod +x Miniconda3-latest-Linux-x86_64.sh +# Latest anaconda is using openssl-3 which is incompatible with all currently published versions of git +# Which are using openssl-1.1.1, see https://anaconda.org/anaconda/git/files?version=2.40.1 for example +MINICONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-py311_23.5.2-0-Linux-x86_64.sh +wget -q $MINICONDA_URL # NB: Manually invoke bash per https://github.com/conda/conda/issues/10431 -bash ./Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda -rm Miniconda3-latest-Linux-x86_64.sh +bash $(basename "$MINICONDA_URL") -b -p /opt/conda +rm $(basename "$MINICONDA_URL") export PATH=/opt/conda/bin:$PATH +# See https://github.com/pytorch/builder/issues/1473 +# Pin conda to 23.5.2 as it's the last one compatible with openssl-1.1.1 +conda install -y conda=23.5.2 conda-build anaconda-client git ninja # The cmake version here needs to match with the minimum version of cmake # supported by PyTorch (3.18). There is only 3.18.2 on anaconda -conda install -y conda-build anaconda-client git ninja cmake=3.18.2 +/opt/conda/bin/pip3 install cmake==3.18.2 conda remove -y --force patchelf