diff --git a/o/onnxruntime/build_info.json b/o/onnxruntime/build_info.json index 180f883e6c..06bfdfd9ff 100644 --- a/o/onnxruntime/build_info.json +++ b/o/onnxruntime/build_info.json @@ -1,11 +1,11 @@ { - "maintainer": "vinodk99", + "maintainer": "sanskarnema10", "package_name": "onnxruntime", "github_url": "https://github.com/microsoft/onnxruntime", - "version": "v1.23.2", + "version": "v1.24.1", "default_branch": "main", "package_dir": "o/onnxruntime", - "build_script": "onnxruntime_1.23.2_ubi_9.6.sh", + "build_script": "onnxruntime_1.24.1_ubi_9.6.sh", "docker_build": false, "validate_build_script": true, "use_non_root_user": false, @@ -23,6 +23,6 @@ "build_script": "onnxruntime_1.22.0_ubi_9.3.sh" }, "*": { - "build_script": "onnxruntime_1.23.2_ubi_9.6.sh" + "build_script": "onnxruntime_1.24.1_ubi_9.6.sh" } } diff --git a/o/onnxruntime/onnxruntime_1.23.2_ubi_9.6.sh b/o/onnxruntime/onnxruntime_1.24.1_ubi_9.6.sh similarity index 88% rename from o/onnxruntime/onnxruntime_1.23.2_ubi_9.6.sh rename to o/onnxruntime/onnxruntime_1.24.1_ubi_9.6.sh index 89006ca7ff..04fcda44b3 100644 --- a/o/onnxruntime/onnxruntime_1.23.2_ubi_9.6.sh +++ b/o/onnxruntime/onnxruntime_1.24.1_ubi_9.6.sh @@ -3,13 +3,13 @@ # ----------------------------------------------------------------------------- # # Package : onnxruntime -# Version : v1.23.2 +# Version : v1.24.1 # Source repo : https://github.com/microsoft/onnxruntime # Tested on : UBI:9.6 # Language : Python # Ci-Check : True # Script License : Apache License, Version 2 or later -# Maintainer : BODAPATI MAHESH +# Maintainer : Sanskar Nema # # Disclaimer: This script has been tested in root mode on given # ========== platform using the mentioned version of the package. @@ -20,7 +20,7 @@ # ---------------------------------------------------------------------------- PACKAGE_NAME=onnxruntime -PACKAGE_VERSION=${1:-v1.23.2} +PACKAGE_VERSION=${1:-v1.24.1} PACKAGE_URL=https://github.com/microsoft/onnxruntime PACKAGE_DIR="onnxruntime" WORK_DIR=$(pwd) @@ -152,6 +152,7 @@ OBJCOPY=$gcc_home/bin/objcopy OBJDUMP=$gcc_home/bin/objdump RANLIB=$gcc_home/bin/ranlib STRIP=$gcc_home/bin/strip +NUMPY_INCLUDE=$(python3.12 -c "import numpy; print(numpy.get_include())") export CMAKE_ARGS="" export CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$ONNX_PREFIX" export CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_AR=${AR}" @@ -164,6 +165,11 @@ export CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_STRIP=${STRIP}" export CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_CXX_STANDARD=17" export CMAKE_ARGS="${CMAKE_ARGS} -DProtobuf_PROTOC_EXECUTABLE="$PROTOC" -DProtobuf_LIBRARY="$LIBPROTO_INSTALL/lib64/libprotobuf.so"" export CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH" +export CMAKE_ARGS="$CMAKE_ARGS \ +-DPython3_EXECUTABLE=$(which python3.12) \ +-DPython3_INCLUDE_DIR=$PYTHON_INCLUDE \ +-DPython3_NumPy_INCLUDE_DIR=$NUMPY_INCLUDE \ +-DPython3_FIND_STRATEGY=LOCATION" # Adding this source due to - (Unable to detect linker for compiler `cc -Wl,--version`) source /opt/rh/gcc-toolset-13/enable @@ -189,7 +195,7 @@ NUMPY_INCLUDE=$(python3.12 -c "import numpy; print(numpy.get_include())") echo "NumPy include path: $NUMPY_INCLUDE" # Manually defines Python::NumPy for CMake versions with broken NumPy detection -sed -i '193i # Fix for Python::NumPy target not found\nif(NOT TARGET Python::NumPy)\n find_package(Python3 COMPONENTS NumPy REQUIRED)\n add_library(Python::NumPy INTERFACE IMPORTED)\n target_include_directories(Python::NumPy INTERFACE ${Python3_NumPy_INCLUDE_DIR})\n message(STATUS "Manually defined Python::NumPy with include dir: ${Python3_NumPy_INCLUDE_DIR}")\nendif()\n' $CURRENT_DIR/onnxruntime/cmake/onnxruntime_python.cmake +# sed -i '193i # Fix for Python::NumPy target not found\nif(NOT TARGET Python::NumPy)\n find_package(Python3 COMPONENTS NumPy REQUIRED)\n add_library(Python::NumPy INTERFACE IMPORTED)\n target_include_directories(Python::NumPy INTERFACE ${Python3_NumPy_INCLUDE_DIR})\n message(STATUS "Manually defined Python::NumPy with include dir: ${Python3_NumPy_INCLUDE_DIR}")\nendif()\n' $CURRENT_DIR/onnxruntime/cmake/onnxruntime_python.cmake export CXXFLAGS="-I/usr/local/lib64/python${PYTHON_VERSION}/site-packages/numpy/_core/include/numpy $CXXFLAGS" # Add Python include path to build environment @@ -199,7 +205,7 @@ export C_INCLUDE_PATH=$PYTHON_INCLUDE:$C_INCLUDE_PATH #Build and Test #Building and testing both are performed in build.sh if ! (./build.sh \ - --cmake_extra_defines "onnxruntime_PREFER_SYSTEM_LIB=ON" "Protobuf_PROTOC_EXECUTABLE=$PROTO_PREFIX/bin/protoc" "Protobuf_INCLUDE_DIR=$PROTO_PREFIX/include" "onnxruntime_USE_COREML=OFF" "Python3_NumPy_INCLUDE_DIR=$NUMPY_INCLUDE" "CMAKE_POLICY_DEFAULT_CMP0001=NEW" "CMAKE_POLICY_DEFAULT_CMP0002=NEW" "CMAKE_POLICY_VERSION_MINIMUM=3.5" \ + --cmake_extra_defines "onnxruntime_PREFER_SYSTEM_LIB=ON" "Protobuf_PROTOC_EXECUTABLE=$LIBPROTO_INSTALL/bin/protoc" "Protobuf_INCLUDE_DIR=$LIBPROTO_INSTALL/include" "onnxruntime_USE_COREML=OFF" "Python3_NumPy_INCLUDE_DIR=$NUMPY_INCLUDE" "CMAKE_POLICY_DEFAULT_CMP0001=NEW" "CMAKE_POLICY_DEFAULT_CMP0002=NEW" "CMAKE_POLICY_VERSION_MINIMUM=3.5" \ --cmake_generator Ninja \ --build_shared_lib \ --config Release \ @@ -219,4 +225,4 @@ else fi cp $CURRENT_DIR/onnxruntime/build/Linux/Release/dist/*.whl "$CURRENT_DIR" -exit 0 +exit 0 \ No newline at end of file