Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:kill_it
onnxruntime
onnxruntime.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File onnxruntime.spec of Package onnxruntime
# # spec file for package onnxruntime # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpuinfo_ver 5916273 %define flatbuffers_ver 1.12.0 %define mp11_ver 1.84.0 %define nsync_ver 1.23.0 %define onnx_ver e252555 %define protobuf_ver 21.12 %define safeint_ver ff15c6a %define so_uffix 1_16_3 %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 %define skip_python312 1 %define skip_python36 1 Name: onnxruntime Version: 1.16.3 Release: 0 Summary: Cross-platform, high performance ML inferencing and training accelerator License: MIT AND Apache-2.0 AND MPL-2.0 URL: https://github.com/microsoft/onnxruntime/ Source0: %{name}-%{version}.tar.xz Source1: cpuinfo-%{cpuinfo_ver}.tar.xz Source2: flatbuffers-%{flatbuffers_ver}.tar.xz Source3: mp11-%{mp11_ver}.tar.xz Source4: nsync-%{nsync_ver}.tar.xz Source5: onnx-%{onnx_ver}.tar.xz Source6: protobuf-%{protobuf_ver}.tar.xz Source7: safeint-%{safeint_ver}.tar.xz Patch0: onnxruntime-python-and-Wno-error.patch Patch1: onnxruntime-system-date.patch Patch2: flatbuffers.patch Patch4: versioned-onnxruntime_providers_shared.patch Patch5: onnxruntime-pybind11_state-noexecstack.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel} BuildRequires: %{python_module numpy} BuildRequires: %{python_module packaging} BuildRequires: %{python_module pip} BuildRequires: %{python_module pybind11-devel} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module sympy} BuildRequires: %{python_module wheel} BuildRequires: abseil-cpp-devel BuildRequires: boost-devel # BuildRequires: flatbuffers-devel BuildRequires: hhdate-devel BuildRequires: cmake BuildRequires: eigen3-devel BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gmock BuildRequires: gsl-devel BuildRequires: gtest # BuildRequires: libnsync-devel BuildRequires: libtool BuildRequires: ms-gsl-devel BuildRequires: nlohmann_json-devel # BuildRequires: onnx-devel BuildRequires: openblas-devel BuildRequires: pkgconfig # BuildRequires: protobuf21-devel BuildRequires: python-rpm-macros BuildRequires: re2-devel BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(zlib) Requires(post): update-alternatives Requires(postun): update-alternatives %python_subpackages %description ONNX Runtime is a performance-focused scoring engine for Open Neural Network Exchange (ONNX) models. For more information on ONNX Runtime, please see <https://aka.ms/onnxruntime/> or <https://github.com/microsoft/onnxruntime/>. %package -n lib%{name}%{so_uffix} Summary: Cross-platform, high performance ML inferencing and training accelerator %description -n lib%{name}%{so_uffix} ONNX Runtime is a performance-focused scoring engine for Open Neural Network Exchange (ONNX) models. For more information on ONNX Runtime, please see <https://aka.ms/onnxruntime/> or <https://github.com/microsoft/onnxruntime/>. %package -n %{name}-devel Summary: Development files for %{name} Requires: lib%{name}%{so_uffix} = %{version} %description -n %{name}-devel Development headers and libraries for ONNX Runtime. %prep %setup -q %patch 0 -p2 %patch 1 -p2 %patch 4 -p1 %patch 5 -p1 mkdir -p cmake/deps tar xf %{SOURCE1} -C cmake/deps tar xf %{SOURCE2} -C cmake/deps tar xf %{SOURCE3} -C cmake/deps tar xf %{SOURCE4} -C cmake/deps tar xf %{SOURCE5} -C cmake/deps tar xf %{SOURCE6} -C cmake/deps tar xf %{SOURCE7} -C cmake/deps %patch 2 -p1 -d cmake/deps/flatbuffers-1.12.0/ %build pushd cmake %global _lto_cflags %{_lto_cflags} -ffat-lto-objects %cmake -DBUILD_SHARED_LIBS:BOOL=OFF \ -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ -DFETCHCONTENT_QUIET=OFF \ -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS \ -Donnxruntime_DISABLE_ABSEIL=ON \ -Donnxruntime_ENABLE_PYTHON=ON \ -Donnxruntime_BUILD_UNIT_TESTS=OFF \ -Donnxruntime_BUILD_SHARED_LIB=ON \ -Donnxruntime_INSTALL_UNIT_TESTS=OFF \ -Donnxruntime_BUILD_BENCHMARKS=OFF \ -Donnxruntime_USE_FULL_PROTOBUF=ON \ -Donnxruntime_USE_PREINSTALLED_EIGEN=ON \ -Deigen_SOURCE_PATH=/usr/include/eigen3 \ -DFETCHCONTENT_SOURCE_DIR_PYTORCH_CPUINFO=/%{_builddir}/%{name}-%{version}/cmake/deps/cpuinfo-%{cpuinfo_ver} \ -DFETCHCONTENT_SOURCE_DIR_FLATBUFFERS=%{_builddir}/%{name}-%{version}/cmake/deps/flatbuffers-%{flatbuffers_ver} \ -DFETCHCONTENT_SOURCE_DIR_MP11=%{_builddir}/%{name}-%{version}/cmake/deps/mp11-%{mp11_ver} \ -DFETCHCONTENT_SOURCE_DIR_GOOGLE_NSYNC=%{_builddir}/%{name}-%{version}/cmake/deps/nsync-%{nsync_ver} \ -DFETCHCONTENT_SOURCE_DIR_ONNX=%{_builddir}/%{name}-%{version}/cmake/deps/onnx-%{onnx_ver} \ -DFETCHCONTENT_SOURCE_DIR_PROTOBUF=%{_builddir}/%{name}-%{version}/cmake/deps/protobuf-%{protobuf_ver} \ -DFETCHCONTENT_SOURCE_DIR_SAFEINT=%{_builddir}/%{name}-%{version}/cmake/deps/safeint-%{safeint_ver} %cmake_build popd # must be called in this subdirectory pushd cmake/build %python_exec ../../setup.py build popd %install # must be called in this subdirectory pushd cmake %cmake_install pushd build %python_exec ../../setup.py install -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} %python_expand %fdupes %{buildroot}%{$python_sitearch} %python_clone -a %{buildroot}%{_bindir}/onnxruntime_test %post %python_install_alternative onnxruntime_test %postun %python_uninstall_alternative onnxruntime_test %post -n lib%{name}%{so_uffix} -p /sbin/ldconfig %postun -n lib%{name}%{so_uffix} -p /sbin/ldconfig %files -n lib%{name}%{so_uffix} %license LICENSE ThirdPartyNotices.txt %doc README.md %{_libdir}/libonnxruntime.so.%{version} %{_libdir}/libonnxruntime_providers_shared.so.%{version} %files -n %{name}-devel %dir %{_includedir}/onnxruntime/ %{_includedir}/onnxruntime/* %{_libdir}/libonnxruntime.so %{_libdir}/libonnxruntime_providers_shared.so %dir %{_libdir}/cmake/onnxruntime/ %{_libdir}/cmake/onnxruntime/*.cmake %{_libdir}/pkgconfig/libonnxruntime.pc %files %{python_files} %license LICENSE ThirdPartyNotices.txt %doc README.md %{python_sitearch}/onnxruntime* %python_alternative %{_bindir}/onnxruntime_test %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor