Why don't we have a package for CUDA and other NVidia libraries?

Today I was trying to build my first package on OBS, specifically a package for Nvidia NCCL library. Arch-based, Nix, and Debian/Ubuntu-based distros provide it, so I was following the Arch build script as a guideline.

The issue is that to build it, I need Nvidia CUDA libraries installed, but openSUSE doesn’t provide them in any way. I thought it was a problem with the license, but recently, openSUSE started distributing the Nvidia drivers, which exactly like CUDA allows to be redistributed for Linux/BSD systems:

Those portions of the SDK designed exclusively for use on the Linux or FreeBSD operating systems, or other operating systems derived from the source code to these operating systems, may be copied and redistributed for use in accordance with this Agreement, provided that the object code files are not modified in any way (except for unzipping of compressed files).

Source: License Agreement for NVIDIA Software Development Kits — EULA

After all, Arch-based, Nix, and Debian-based distros also distribute the CUDA libraries from their repos.

So the question is, why doesn’t openSUSE distribute the CUDA libraries? Couldn’t I create a home: project for it? If so, which license should I use? For instance, Arch uses an “Nvidia custom” tag for the license field of the cuda package, but I don’t think OBS would accept it, isn’t it?

@00sapo the Nvidia drivers your talking about are the ‘open’ GPLed drivers, not the proprietary…

No, you would be in breach of the openSUSE Build Service Blacklist about closed source modules, see https://en.opensuse.org/openSUSE:Build_Service_application_blacklist

What you mean with GPLed drivers? AFAIK, they’re all closed source and non-redistributable with the exception of Linux/BSD versions.

There is also explained how to install the CUDA stack…

linked from
https://en.opensuse.org/SDB:NVIDIA_drivers

This is different from having them installable via repo. For instance, I could use them in obs…

@00sapo you can’t on the openSUSE Build Service, now there is nothing stopping you from creating your own build service instance and building with that…

Indeed, I noticed that the drivers I was referring to are actually hosted under the nvidia.com domain. Is there any community service hosting non-OSI software?
Honestly, I definitely don’t agree with such a strict policy. Nvidia stuffs should be an exception unless equivalent software is provided as open-source…

@00sapo It is what it is, openSUSE has a special agreement to build and Nvidia to distribute.

Why not just build locally and create the rpm? Whilst it says RedHat, the same spec works with openSUSE in this case as it’s just installing the compiled binaries/libraries.

Because when Nvidia drivers update, you need to also check the versions of CUDA, NCCL, and all depending packages. Installing from locally built RPM or via the official scipt (.run) will make my system (and the software I develop) buggy in 3… 2… 1… boom!

I’m trying to understand if I could create RPM for cuda and NCCL on packman’s OBS…

@00sapo never had that issue here…

 nvidia_check 
	libcudart.so.12 -> libcudart.so.12.3.52
	libcuda.so.1 -> libcuda.so.545.29.06
	libcudadebugger.so.1 -> libcudadebugger.so.545.29.06
	libcuda.so.1 -> libcuda.so.545.29.06
libcuda is installed
	libcudart.so.12 -> libcudart.so.12.3.52
libcudart is installed
	libnccl.so.2 -> libnccl.so.2.19.4
libnccl is installed
	libcudnn_ops_train.so.8 -> libcudnn_ops_train.so.8.9.5
	libcudnn_ops_infer.so.8 -> libcudnn_ops_infer.so.8.9.5
	libcudnn_cnn_train.so.8 -> libcudnn_cnn_train.so.8.9.5
	libcudnn_cnn_infer.so.8 -> libcudnn_cnn_infer.so.8.9.5
	libcudnn_adv_train.so.8 -> libcudnn_adv_train.so.8.9.5
	libcudnn_adv_infer.so.8 -> libcudnn_adv_infer.so.8.9.5
	libcudnn.so.8 -> libcudnn.so.8.9.5
libcudnn is installed
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Sep__8_19:17:24_PDT_2023
Cuda compilation tools, release 12.3, V12.3.52
Build cuda_12.3.r12.3/compiler.33281558_0

That’s probably not a good idea with the limited resources…

1 Like

What is nvidia_check? Anyway, I still think that Nvidia packages should be in packman, especially if distributed already compiled, as CUDA

@00sapo That’s a discussion you need to take up on the Packman Mailing List…

It’s just a script I have to check all the nvidia libs are present on my system.

1 Like