1#!/bin/bash 2# Script used only in CD pipeline 3set -ex 4 5# Anaconda 6# Latest anaconda is using openssl-3 which is incompatible with all currently published versions of git 7# Which are using openssl-1.1.1, see https://anaconda.org/anaconda/git/files?version=2.40.1 for example 8MINICONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-py311_23.5.2-0-Linux-x86_64.sh 9wget -q $MINICONDA_URL 10# NB: Manually invoke bash per https://github.com/conda/conda/issues/10431 11bash $(basename "$MINICONDA_URL") -b -p /opt/conda 12rm $(basename "$MINICONDA_URL") 13export PATH=/opt/conda/bin:$PATH 14# See https://github.com/pytorch/builder/issues/1473 15# Pin conda to 23.5.2 as it's the last one compatible with openssl-1.1.1 16conda install -y conda=23.5.2 conda-build anaconda-client git ninja 17# The cmake version here needs to match with the minimum version of cmake 18# supported by PyTorch (3.18). There is only 3.18.2 on anaconda 19/opt/conda/bin/pip3 install cmake==3.18.2 20conda remove -y --force patchelf 21