Skip to content

NVIDIA/apt-packaging-libnvidia-nscq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apt packaging libnvidia nscq

License Contributing

Overview

Packaging templates for apt based Linux distros to build libnvidia-nscq packages.

NVIDIA NVSwitch Configuration and Query (NSCQ) library provides a stable driver API used by DCGM for monitoring NVSwitch devices.

note: the version of libnvidia-nscq must match the NVIDIA driver installed.

Table of Contents

Deliverables

This repo contains the template files used to build the following DEB packages:

note: XXX is the first . delimited field in the driver version, ex: 525 in 525.85.12

- libnvidia-nscq-XXX
> ex: libnvidia-nscq-525_525.85.12-1_amd64.deb

Installation

  • Debian

    apt-get install libnvidia-nscq-XXX
  • Ubuntu

    apt-get install libnvidia-nscq-XXX

Prerequisites

Clone this git repository:

Supported branches as described in the NVIDIA Datacenter Drivers documentation.

git clone https://github.com/NVIDIA/apt-packaging-libnvidia-nscq

Download a NSCQ tarball:

Install build dependencies

note: these are only needed for building not installation

# objdump
apt-get install binutils
# Packaging
apt-get install debhelper devscripts dpkg-dev

Building Manually

Download tarball via redistrib JSON

baseURL="https://developer.download.nvidia.com/compute/nvidia-driver/redist"
downloadURL=$(curl -s $baseURL/redistrib_525.85.12.json | \
jq -r '."libnvidia_nscq" | ."linux-x86_64" | ."relative_path"' | \
sed "s|^|$baseURL/|")
curl -O $downloadURL

Create a temp directory

cd apt-packaging-libnvidia-nscq
mkdir build
rsync -a debian build/

Download and extract tarball

tar -C build/ -xf ../libnvidia_nscq*.tar.xz
cd build
mv libnvidia_nscq*/* $PWD
rmdir libnvidia_nscq*

Check API version

find -type l -name "*.so.*" | sort -uVr | awk -F ".so." '{print $2}' | awk NR==1
> 2.0

Check SONAME

objdump -p /dev/stdin < $(find -type f -name "libnvidia-nscq.so.*") | \
grep SONAME | awk -F ".so." '{print $2}'
> 2

Fill variables

make -f debian/rules fill_templates VERSION=525.85.12 BRANCH=525 DEB_HOST_ARCH=amd64

note: branch is the first . delimited field in the driver version, ex: 525 in 525.85.12

Generate .deb packages

DEB_BUILD_OPTIONS=nostrip DEB_HOST_ARCH=amd64 \
dpkg-buildpackage -b -aamd64
cd ..
ls *.deb

note: for SBSA (arm64 server), pass DEB_HOST_ARCH=arm64 and -aarm64

Related

Fabric Manager

NVIDIA driver

See also

RPM

Contributing

See CONTRIBUTING.md