From 3dd764b9e6a7df1b5cf3cfb7c310304ab023b9e1 Mon Sep 17 00:00:00 2001
From: Fangjun Kuang <csukuangfj@gmail.com>
Date: Fri, 31 Jan 2025 22:14:15 +0800
Subject: [PATCH] fix installing openssl

---
 scripts/github_actions/build-ubuntu-cuda.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/github_actions/build-ubuntu-cuda.sh b/scripts/github_actions/build-ubuntu-cuda.sh
index 75804eb..89748a0 100755
--- a/scripts/github_actions/build-ubuntu-cuda.sh
+++ b/scripts/github_actions/build-ubuntu-cuda.sh
@@ -27,7 +27,11 @@ if [[ $TORCH_VERSION =~ 2.2.* && $CUDA_VERSION =~ 12.* ]]; then
   export TORCH_CUDA_ARCH_LIST="8.0 8.6 8.9 9.0"
 fi
 
-yum -y install openssl-devel bzip2-devel libffi-devel xz-devel wget redhat-lsb-core
+if [[ x"$IS_2_28" != x"1" ]]; then
+yum -y install openssl-devel
+fi
+
+yum -y install bzip2-devel libffi-devel xz-devel wget redhat-lsb-core
 
 INSTALLED_PYTHON_VERSION=${PYTHON_VERSION}.2
 if [[ $PYTHON_VERSION == "3.13" ]]; then
@@ -41,7 +45,7 @@ pushd Python-$INSTALLED_PYTHON_VERSION
 
 PYTHON_INSTALL_DIR=$PWD/py-${PYTHON_VERSION}
 
-if [[ $PYTHON_VERSION =~ 3.1. ]]; then
+if [[ $PYTHON_VERSION =~ 3.1. && x"$IS_2_28" != x"1" ]]; then
   yum install -y openssl11-devel
   sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure
 fi