Coder Social home page Coder Social logo

yum-packaging-nvidia-driver's Introduction

yum packaging nvidia driver

License Contributing

Overview

Packaging templates for yum and dnf based Linux distros to build NVIDIA driver packages.

The main branch contains this README. The .spec, .conf, and .sh files can be found in the rhel7, rhel8, and fedora virtual branches.

note: Virtual branches point to the highest available driver branch. Please use the appropriate XXX-rhel7 (RHEL7-like) or XXX (Fedora/RHEL8-like) git branch to package older driver major versions.

Table of Contents

Deliverables

This repo contains the .spec file used to build the following RPM packages:

note: XXX is the first . delimited field in the driver version, ex: 460 in 460.32.03

  • RHEL8 or Fedora streams: XXX, XXX-dkms, latest, and latest-dkms
- nvidia-driver
- nvidia-driver-cuda
- nvidia-driver-cuda-libs
- nvidia-driver-devel
- nvidia-driver-libs
- nvidia-driver-NvFBCOpenGL
- nvidia-driver-NVML

For RHEL7 and derivatives, there are three sets of packages with different package dependencies.

The latest and latest-dkms flavors always update to the highest versioned driver, while the branch-XXX flavor locks driver updates to the specified driver branch.

  • RHEL7 flavor: latest-dkms
- nvidia-driver-latest-dkms
- nvidia-driver-latest-dkms-cuda
- nvidia-driver-latest-dkms-cuda-libs
- nvidia-driver-latest-dkms-devel
- nvidia-driver-latest-dkms-libs
- nvidia-driver-latest-dkms-NvFBCOpenGL
- nvidia-driver-latest-dkms-NVML

note: XXX-dkms is not supported for RHEL7

To use the precompiled flavors latest and branch-XXX, use yum-packaging-precompiled-kmod to build kmod-nvidia-latest or kmod-nvidia-branch-XXX kernel modules for a specific kernel and driver combination.

  • RHEL7 flavor: latest
- nvidia-driver-latest
- nvidia-driver-latest-cuda
- nvidia-driver-latest-cuda-libs
- nvidia-driver-latest-devel
- nvidia-driver-latest-libs
- nvidia-driver-latest-NvFBCOpenGL
- nvidia-driver-latest-NVML
  • RHEL7 flavor: branch-XXX
- nvidia-driver-branch-XXX
- nvidia-driver-branch-XXX-cuda
- nvidia-driver-branch-XXX-cuda-libs
- nvidia-driver-branch-XXX-devel
- nvidia-driver-branch-XXX-libs
- nvidia-driver-branch-XXX-NvFBCOpenGL
- nvidia-driver-branch-XXX-NVML

Packaging Guide

note: this guide covers building all of the yum-packaging NVIDIA driver packages. To build only the deliverables in this repository, see Prerequisites and Building Manually sections.

RHEL8 and Fedora-derivatives

RHEL7-derivatives

Demo

RHEL8

Demo-RHEL8

webm asciinema gist

RHEL7

Demo-RHEL7

mp4 asciinema gist

Prerequisites

Clone this git repository:

Virtual branches: rhel7, rhel8 & fedora point to the latest branch Supported branches: XXX-rhel7 (RHEL7-like) and XXX (Fedora/RHEL8-like)

git clone -b ${branch} https://github.com/NVIDIA/yum-packaging-nvidia-driver
> ex: git clone -b 510 https://github.com/NVIDIA/yum-packaging-nvidia-driver
> ex: git clone -b 470-rhel7 https://github.com/NVIDIA/yum-packaging-nvidia-driver

Install build dependencies

# Misc
yum install libappstream-glib
# Packaging
yum install rpm-build

Building with script

Fetch script from main branch

cd yum-packaging-nvidia-driver
git checkout remotes/origin/main -- build.sh

Usage

note: distro is fedora33, rhel7, rhel8

./build.sh path/to/*.run ${distro}
> ex: time ./build.sh ~/Downloads/NVIDIA-Linux-x86_64-460.32.03.run rhel7

Building Manually

Generate tarballs from runfile

version="460.32.03"
export RUN_FILE="/path/to/NVIDIA-Linux-${arch}-${version}.run"
export VERSION="$version"
rm -rf temp
nvidia-generate-tarballs-${arch}.sh
ls *.tar.xz
> nvidia-driver-${version}-${arch}.tar.xz  # x86_64 script does not have -${arch} suffix
> nvidia-driver-${version}-i386.tar.xz     # 32-bit libraries for x86_64 only
> nvidia-kmod-${version}-${arch}.tar.xz    # not used here

Packaging (dnf distros)

note: fedora & rhel8-based distros

mkdir BUILD BUILDROOT RPMS SRPMS SOURCES SPECS
cp *.conf SOURCES/
cp nvidia-driver-${version}-${arch}.tar.xz SOURCES/
cp nvidia-driver.spec SPECS/

rpmbuild \
    --define "%_topdir $(pwd)" \
    --define "debug_package %{nil}" \
    --define "version $version" \
    --define "epoch 3" \
    --target "${arch}" \
    -v -bb SPECS/nvidia-driver.spec

Packaging (yum distros)

note: rhel7-based distros

mkdir BUILD BUILDROOT RPMS SRPMS SOURCES SPECS
cp *.rules SOURCES/
cp *.conf SOURCES/
cp nvidia-driver-${version}-${arch}.tar.xz SOURCES/
cp nvidia-driver.spec SPECS/

# latest-dkms
rpmbuild \
    --define "%_topdir $(pwd)" \
    --define "debug_package %{nil}" \
    --define "version $version" \
    --define "driver_branch latest-dkms" \
    --define "is_dkms 1" \
    --define "is_latest 1" \
    --define "epoch 3" \
    --target "${arch}" \
    -v -bb SPECS/nvidia-driver.spec

# latest
rpmbuild \
    --define "%_topdir $(pwd)" \
    --define "debug_package %{nil}" \
    --define "version $version" \
    --define "driver_branch latest" \
    --define "is_dkms 0" \
    --define "is_latest 1" \
    --define "epoch 3" \
    --target "${arch}" \
    -v -bb SPECS/nvidia-driver.spec

# branch-460
rpmbuild \
    --define "%_topdir $(pwd)" \
    --define "debug_package %{nil}" \
    --define "version $version" \
    --define "driver_branch branch-460" \
    --define "is_dkms 0" \
    --define "is_latest 0" \
    --define "epoch 3" \
    --target "${arch}" \
    -v -bb SPECS/nvidia-driver.spec

Related

DKMS nvidia

NVIDIA kmod common

NVIDIA modprobe

NVIDIA persistenced

NVIDIA plugin

NVIDIA precompiled kmod

NVIDIA settings

NVIDIA xconfig

See also

Ubuntu driver

SUSE driver

Contributing

See CONTRIBUTING.md

yum-packaging-nvidia-driver's People

Contributors

adibbley avatar andydick avatar fparkarnvidia avatar hughsie avatar jp7677 avatar kmittman avatar scaronni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

yum-packaging-nvidia-driver's Issues

nvidia-gridd not available with built packages

Trying to use the method of
https://developer.nvidia.com/blog/streamlining-nvidia-driver-deployment-on-rhel-8-with-modularity-streams/

to use the pre-compiled packages with a virtual GPU.

that requires that nvidia-gridd[1] is available and running but this seems to normally be generated by
NVIDIA-Linux-x86_64-470.63.01-grid.run in the non rpm world.

Should the nvidia-gridd service be included in the release?

[1] https://docs.nvidia.com/grid/4.3/grid-licensing-user-guide/index.html#licensing-grid-vgpu-linux

Details:

CentOS Stream 8

  • 4.18.0-348.7.1.el8_5.x86_64
nvidia-modprobe-495.29.05-1.el8.x86_64
nvidia-settings-495.29.05-1.el8.x86_64
nvidia-driver-NVML-495.29.05-1.el8.x86_64
nvidia-driver-cuda-495.29.05-1.el8.x86_64
nvidia-libXNVCtrl-devel-495.29.05-1.el8.x86_64
nvidia-driver-cuda-libs-495.29.05-1.el8.x86_64
nvidia-libXNVCtrl-495.29.05-1.el8.x86_64
nvidia-driver-NvFBCOpenGL-495.29.05-1.el8.x86_64
nvidia-driver-devel-495.29.05-1.el8.x86_64
nvidia-driver-495.29.05-1.el8.x86_64
nvidia-persistenced-495.29.05-1.el8.x86_64
dnf-plugin-nvidia-2.0-1.el8.noarch
nvidia-driver-libs-495.29.05-1.el8.x86_64
nvidia-xconfig-495.29.05-1.el8.x86_64
kmod-nvidia-495.29.05-4.18.0-348.7.1-495.29.05-3.el8_5.x86_64
nvidia-kmod-common-495.29.05-1.el8.noarch

[FEATURE] RHEL module stream named `latest-kmod`

My config management utility (puppet) is unable to distinguish between the module stream named latest and finding the most recent module stream ("latest"). On some hosts it picks up the dkms stream and on others the kmod stream, depending on when exactly it was run.

Can there be a stream named latest-kmod added so it is both explicit and something I can target?

Missing symlink β€œnvidia-drm_gbm.so” in Fedora driver package. Necessary for Wayland.

Hi.

I’m using the official Nvidia Cuda Repostory for Fedora to install both, the cuda toolkit and the nvidia driver. It works fine but the driver packages are missing a symlink that should be there since v495 (see release notes, first highlight). The symlink should be /usr/lib64/gbm/nvidia-drm_gbm.so β†’ /usr/lib64/libnvidia-allocator.so.VERSION (or -> ../libnvidia-allocator.so.VERSION).

Without this symlink Wayland session does not start at all.

I created the symlink manually, but it would be nice if it was already in the package, unless there is a reason why it is not the case. The hard part of fixing the issue was finding out that the symlink was missing at all.

I don't know if this issues is also present in the RHEL 8 Repo.

I've also posted the issue at in the Forum but I found this github page later, which I think is the right place to post it.

Thank you in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.