forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcudnn.spec
33 lines (25 loc) · 900 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
33
### RPM external cudnn 8.3.3.40
## INITENV +PATH LD_LIBRARY_PATH %i/lib64
%define cudaver 11.5
%define cudnnver_maj %(echo %{realversion} | cut -f1,2,3 -d.)
# 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/redist/cudnn/v%{cudnnver_maj}/local_installers/%{cudaver}/%{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}/