diff --git a/onnxruntime.spec b/onnxruntime.spec index 2111224cf36..211003137d6 100644 --- a/onnxruntime.spec +++ b/onnxruntime.spec @@ -9,7 +9,9 @@ Source1: https://github.com/microsoft/onnxruntime/commit/de4089f8cbe0baffe56a363 BuildRequires: cmake ninja Requires: protobuf py3-numpy py3-wheel py3-onnx zlib libpng py3-pybind11 +%if "%{cmsos}" != "slc7_aarch64" Requires: cuda cudnn +%endif %prep %setup -q -n %{n}-%{realversion} @@ -18,11 +20,11 @@ patch -p1 < %{_sourcedir}/de4089f8cbe0baffe56a363cc3a41595cc8f0809.patch %build rm -rf ../build; mkdir ../build; cd ../build -if [ $(%{cuda_gcc_support}) = true ]; then +%if "%{cmsos}" != "slc7_aarch64" USE_CUDA=ON -else +%else USE_CUDA=OFF -fi +%endif cmake ../%{n}-%{realversion}/cmake -GNinja \ -DPYTHON_EXECUTABLE=${PYTHON3_ROOT}/bin/python3 \