%global _empty_manifest_terminate_build 0 Name: onnxruntime Version: 1.17.1 Release: 1 Summary: Open Source Neural Network Inference Engine License: MIT URL: https://github.com/microsoft/onnxruntime Source0: https://openi.pcl.ac.cn/JunJun-Liu/onnx-runtime/onnxruntime-1.17.1.tar.gz BuildRequires: gcc-c++ BuildRequires: python3-devel BuildRequires: cmake Requires: python3-numpy %description ONNX Runtime is a performance-focused inference engine for ONNX (Open Neural Network Exchange) models. These models can come from a variety of frameworks, such as TensorFlow, PyTorch, or Keras. ONNX Runtime provides an easy way to run models in a fast and efficient manner with minimal dependencies. %prep %setup -q -n onnxruntime-1.17.1 %build # Install a specific version of CMake CMAKE_VERSION=3.26.0 CMAKE_DIR=cmake-$CMAKE_VERSION-Linux-x86_64 CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/$CMAKE_DIR.tar.gz curl -L $CMAKE_URL | tar xz export PATH=$(pwd)/$CMAKE_DIR/bin:$PATH # Verify installed CMake version cmake --version export CFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict -fPIC" export CXXFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict -fPIC" mkdir -p build && cd build cmake ../cmake -DCMAKE_BUILD_TYPE=Release -Donnxruntime_RUN_ONNX_TESTS=OFF -Donnxruntime_BUILD_WINML_TESTS=OFF -Donnxruntime_GENERATE_TEST_REPORTS=OFF -Donnxruntime_LOG_LEVEL=VERBOSE -Donnxruntime_ENABLE_PYTHON=OFF -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_C_FLAGS_RELEASE="%{optflags}" -DCMAKE_CXX_FLAGS_RELEASE="%{optflags}" -Donnxruntime_USE_CUDA=OFF -Donnxruntime_CUDNN_HOME="" -Donnxruntime_USE_FEATURIZERS=OFF -Donnxruntime_USE_JEMALLOC=OFF -Donnxruntime_USE_MIMALLOC=OFF -Donnxruntime_ENABLE_LTO=OFF -Donnxruntime_BUILD_SHARED_LIB=ON -Donnxruntime_USE_PREINSTALLED_EIGEN=OFF -DEIGEN_SOURCE_PATH="" -Donnxruntime_USE_OPENBLAS=OFF -Donnxruntime_USE_DNNL=OFF -Donnxruntime_USE_MKLML=OFF -Donnxruntime_USE_NGRAPH=OFF -Donnxruntime_USE_OPENVINO=OFF -Donnxruntime_USE_TVM=OFF -Donnxruntime_USE_LLVM=OFF -Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF -Donnxruntime_USE_BRAINSLICE=OFF -Donnxruntime_USE_NUPHAR=OFF -Donnxruntime_USE_TENSORRT=OFF -Donnxruntime_TENSORRT_HOME="" -Donnxruntime_USE_MYNNA=OFF -Donnxruntime_USE_VITISAI=OFF -Donnxruntime_USE_ACL=OFF -Donnxruntime_USE_ARMNN=OFF -Donnxruntime_BUILD_FOR_NATIVE_MACHINE=OFF -Donnxruntime_USE_TELEMETRY=OFF -Donnxruntime_ENABLE_LANGUAGE_INTEROP_OPS=OFF -Donnxruntime_USE_DML=OFF -Donnxruntime_USE_NCCL=OFF -Donnxruntime_USE_MPI=OFF -LAH %make_build %install %make_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/doclist.lst . %files %doc *.md %license LICENSE %{_bindir}/* %{python3_sitearch}/* %changelog * Thu Feb 29 2024 JunjunLiu <172074482@qq.com> - 1.17.1-1 - Initial package version for ONNX Runtime 1.17.1