Skip to content

Commit

Permalink
Fix Linux python CUDA package pipeline (microsoft#22803)
Browse files Browse the repository at this point in the history
### Description
Making ::p optional in the Linux python CUDA package pipeline



### Motivation and Context
Linux stage from Python-CUDA-Packaging-Pipeline has failed since merge
of microsoft#22773
  • Loading branch information
jchen351 authored Nov 13, 2024
1 parent 6d7603f commit f423b73
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tools/ci_build/github/linux/build_linux_python_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,27 @@ EXTRA_ARG=""
ENABLE_CACHE=false
# Put 3.10 at the last because Ubuntu 22.04 use python 3.10 and we will upload the intermediate build files of this
# config to Azure DevOps Artifacts and download them to a Ubuntu 22.04 machine to run the tests.
PYTHON_EXES=("/opt/python/cp311-cp311/bin/python3.11" "/opt/python/cp312-cp312/bin/python3.12" "/opt/python/cp313-cp313/bin/python3.13" "/opt/python/cp313-cp313t/bin/python3.13t" "/opt/python/cp310-cp310/bin/python3.10")
PYTHON_EXES=(
"/opt/python/cp311-cp311/bin/python3.11"
"/opt/python/cp312-cp312/bin/python3.12"
"/opt/python/cp313-cp313/bin/python3.13"
"/opt/python/cp313-cp313t/bin/python3.13t"
"/opt/python/cp310-cp310/bin/python3.10"
)
while getopts "d:p:x:c:e" parameter_Option
do case "${parameter_Option}"
in
#GPU|CPU|NPU.
d) BUILD_DEVICE=${OPTARG};;
p) PYTHON_EXES=("${OPTARG}");;
p)
# Check if OPTARG is empty or starts with a hyphen, indicating a missing or invalid argument for -p
if [[ -z "${OPTARG}" || "${OPTARG}" == -* ]]; then
echo "ERROR: Option -p requires a valid argument, not another option."
exit 1
else
PYTHON_EXES=("${OPTARG}") # Use the provided argument for -p
fi
;;
x) EXTRA_ARG=${OPTARG};;
c) BUILD_CONFIG=${OPTARG};;
e) ENABLE_CACHE=true;;
Expand Down

0 comments on commit f423b73

Please sign in to comment.