forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcudnn.spec
32 lines (24 loc) · 816 Bytes
/
cudnn.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
### RPM external cudnn 8.8.0.121
## INITENV +PATH LD_LIBRARY_PATH %i/lib64
%define cudaver 11
# NVIDIA uses sbsa for aarch64, and the standard architecture name for ppc64le and x86_64
%ifarch aarch64
%define nvarch sbsa
%else
%define nvarch %{_arch}
%endif
# cuDNN archive base name and unpacked name
%define archive cudnn-linux-%{nvarch}-%{realversion}_cuda%{cudaver}-archive
Source: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-%{nvarch}/%{archive}.tar.xz
Requires: cuda
%prep
%setup -n %{archive}
if [ "${CUDA_VERSION%.*.*}" != %{cudaver} ]; then
echo 'Incompatible CUDA version in cudnn.spec!'
exit 1
fi
%build
%install
# onnxruntime is hardcoded to look for the cudnn libraries under .../lib64
mv %_builddir/%{archive}/lib %{i}/lib64
mv %_builddir/%{archive}/* %{i}/