Skip to content

Commit 5e5b42e

Browse files
committed
Updated to latest conda for CentOS stream 9
1 parent c9c5a2b commit 5e5b42e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.ci/docker/common/install_conda.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,13 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
4444

4545
# Prevent conda from updating to 4.14.0, which causes docker build failures
4646
# See https://hud.pytorch.org/pytorch/pytorch/commit/754d7f05b6841e555cea5a4b2c505dd9e0baec1d
47-
# Uncomment the below when resolved to track the latest conda update
48-
# as_jenkins conda update -y -n base conda
47+
# Uncomment the below when resolved to track the latest conda update,
48+
# but this is required for CentOS stream 9 builds
49+
ID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
50+
OS_VERSION=$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"')
51+
if [[ $ID == centos && $OS_VERSION == 9 ]]; then
52+
as_jenkins conda update -y -n base conda
53+
fi
4954

5055
# Install correct Python version
5156
as_jenkins conda create -n py_$ANACONDA_PYTHON_VERSION -y python="$ANACONDA_PYTHON_VERSION"

0 commit comments

Comments
 (0)