Skip to content

canonical/apt-packaging-libnvidia-nscq

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 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: 460 in 460.32.03

- libnvidia-nscq-XXX
> ex: libnvidia-nscq-460_460.32.03-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: main

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

Parse JSON to retrieve download URL

baseURL="https://developer.download.nvidia.com/compute/cuda/redist"
curl -s $baseURL/redistrib_460.32.03.json | \
jq -r '."libnvidia_nscq" | ."460.32.03" | ."linux-x86_64"' | \
sed "s|^|$baseURL/|"

Create a temp directory

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

Extract tarball

tar -C build/ -xf ../libnvidia_nscq*.tar.gz
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
> 1.1

Check SONAME

objdump -p libnvidia-nscq.so.[4-9][0-9][0-9]* | grep SONAME | awk -F ".so." '{print $2}'
> 1

Fill variables

make -f debian/rules fill_templates VERSION=460.32.03 BRANCH=460 DEB_HOST_ARCH=amd64

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

Generate .deb packages

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

Related

Fabric Manager

NVIDIA driver

See also

RPM

Contributing

See CONTRIBUTING.md

Releases

No releases published

Packages

No packages published