diff options
author | GUAN Xin <guanx.bac@gmail.com> | 2024-04-27 06:43:48 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-04-27 07:02:21 +0700 |
commit | f6719466038a3609177c17c20c6cdffb6e0a0248 (patch) | |
tree | dad25a0219ac0cd81852e70ca2e0eeb9e84b1cf7 /system/nvidia-fabricmanager | |
parent | f72b9f53e3caf4a35e95fb85f0f04bd6d974ccb2 (diff) |
system/nvidia-fabricmanager: Added (proprietary binary).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/nvidia-fabricmanager')
-rw-r--r-- | system/nvidia-fabricmanager/README | 6 | ||||
-rw-r--r-- | system/nvidia-fabricmanager/README.SBo | 7 | ||||
-rw-r--r-- | system/nvidia-fabricmanager/doinst.sh.gz | bin | 0 -> 368 bytes | |||
-rw-r--r-- | system/nvidia-fabricmanager/nvidia-fabricmanager.SlackBuild | 87 | ||||
-rw-r--r-- | system/nvidia-fabricmanager/nvidia-fabricmanager.info | 10 | ||||
-rw-r--r-- | system/nvidia-fabricmanager/rc.nvidia-fabricmanager | 75 | ||||
-rw-r--r-- | system/nvidia-fabricmanager/slack-desc | 19 |
7 files changed, 204 insertions, 0 deletions
diff --git a/system/nvidia-fabricmanager/README b/system/nvidia-fabricmanager/README new file mode 100644 index 0000000000000..99e1f1aceb7b3 --- /dev/null +++ b/system/nvidia-fabricmanager/README @@ -0,0 +1,6 @@ +The nvidia-fabricmanager manages NVLink, which is the data transfer +fabric that interconnects NVIDIA data-center GPUs. + +The driver (package nvidia-kernel on SBo) requires the +nv-fabricmanager daemon from the "exact same version" of this package +to initialize GPUs connected by NVLink. diff --git a/system/nvidia-fabricmanager/README.SBo b/system/nvidia-fabricmanager/README.SBo new file mode 100644 index 0000000000000..9bace49bc7462 --- /dev/null +++ b/system/nvidia-fabricmanager/README.SBo @@ -0,0 +1,7 @@ +The nvidia-kernel and nvidia-driver packages on SlackBuilds.org +default to the version number and download links for consumer GPUs. + +Drivers for data-center GPUs are distributed by NVIDIA in +separate packages from that for their consumer GPUs, +usually compatible with these two packages despite bearing different +version numbers. diff --git a/system/nvidia-fabricmanager/doinst.sh.gz b/system/nvidia-fabricmanager/doinst.sh.gz Binary files differnew file mode 100644 index 0000000000000..d84c6bc589646 --- /dev/null +++ b/system/nvidia-fabricmanager/doinst.sh.gz diff --git a/system/nvidia-fabricmanager/nvidia-fabricmanager.SlackBuild b/system/nvidia-fabricmanager/nvidia-fabricmanager.SlackBuild new file mode 100644 index 0000000000000..6da635118ea70 --- /dev/null +++ b/system/nvidia-fabricmanager/nvidia-fabricmanager.SlackBuild @@ -0,0 +1,87 @@ +#!/bin/bash + +# Slackware build script for nvidia-fabricmanager + +# Copyright 2024 GUAN Xin <guanx.bac@gmail.com> from Beijing +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=nvidia-fabricmanager +VERSION=${VERSION:-550.54.14} +SRCVER=${SRCVER:-$(printf "%s_%s-1" `echo $VERSION | cut -d. -f1,1` $VERSION)} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "x86_64" ]; then + SRCARCH=amd64 +else + echo "$ARCH is not supported" + exit 1 +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT + +cd $PKG +ar p $CWD/$PRGNAM-${SRCVER}_$SRCARCH.deb data.tar.xz | tar -Jxv + +# This file should really be under /etc but let's keep it as is for the +# least surpise of users migrated from other distributions to Slackware: +mv $PKG/usr/share/nvidia/nvswitch/fabricmanager.cfg $PKG/usr/share/nvidia/nvswitch/fabricmanager.cfg.new + +# Replace systemd files with sysvinit script +rm -fr $PKG/lib +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.nvidia-fabricmanager > $PKG/etc/rc.d/rc.nvidia-fabricmanager +chmod 755 $PKG/etc/rc.d/rc.nvidia-fabricmanager + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv -t $PKG/usr/doc/$PRGNAM-$VERSION $PKG/usr/share/doc/$PRGNAM/* +rm -fr $PKG/usr/share/doc +cp -t $PKG/usr/doc/$PRGNAM-$VERSION $CWD/README* +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/nvidia-fabricmanager/nvidia-fabricmanager.info b/system/nvidia-fabricmanager/nvidia-fabricmanager.info new file mode 100644 index 0000000000000..d03783d698980 --- /dev/null +++ b/system/nvidia-fabricmanager/nvidia-fabricmanager.info @@ -0,0 +1,10 @@ +PRGNAM="nvidia-fabricmanager" +VERSION="550.54.14" +HOMEPAGE="https://www.nvidia.com" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/nvidia-fabricmanager-550_550.54.14-1_amd64.deb" +MD5SUM_x86_64="3516bc2432678f9335d8c7670d684f84" +REQUIRES="" +MAINTAINER="GUAN Xin" +EMAIL="guanx.bac@gmail.com" diff --git a/system/nvidia-fabricmanager/rc.nvidia-fabricmanager b/system/nvidia-fabricmanager/rc.nvidia-fabricmanager new file mode 100644 index 0000000000000..2f90f16725388 --- /dev/null +++ b/system/nvidia-fabricmanager/rc.nvidia-fabricmanager @@ -0,0 +1,75 @@ +#!/bin/sh + +# Slackware init script to start/stop/restart nvidia-fabricmanager. + +# Copyright 2024 GUAN Xin <guanx.bac@gmail.com> from Beijing +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +EXE="/usr/bin/nv-fabricmanager" +CFG="/usr/share/nvidia/nvswitch/fabricmanager.cfg" +CMD="$EXE -c $CFG" + +# Start nvidia-fabricmanager: +fabricmanager_start() { + PID=`pgrep -f "$CMD"` + if [ $PID -gt 0 ] 2>/dev/null; then + echo "nvidia-fabricmanager is already running as PID $PID" >&2 + exit 3 + elif [ -x $EXE ]; then + echo "Starting nvidia-fabricmanager: $CMD" + $CMD + fi +} + +# Stop nvidia-fabricmanager: +fabricmanager_stop() { + PID=`pgrep -f "$CMD"` + if [ $PID -gt 0 ] 2>/dev/null; then + printf 'Stopping nvidia-fabricmanager (PID %d).' $PID + kill $PID + timeout 10 tail --pid=$PID -f /dev/null + if [ $? -eq 124 ]; then + echo " Timeout." + exit 124 + fi + echo + fi +} + +# Restart nvidia-fabricmanager: +fabricmanager_restart() { + fabricmanager_stop + fabricmanager_start +} + +case "$1" in +'start') + fabricmanager_start + ;; +'stop') + fabricmanager_stop + ;; +'restart') + fabricmanager_restart + ;; +*) + echo "usage $0 start|stop|restart" + exit 2 +esac diff --git a/system/nvidia-fabricmanager/slack-desc b/system/nvidia-fabricmanager/slack-desc new file mode 100644 index 0000000000000..b642a49e61c07 --- /dev/null +++ b/system/nvidia-fabricmanager/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +nvidia-fabricmanager: nvidia-fabricmanager (required to initialized NVLink connected GPUs) +nvidia-fabricmanager: +nvidia-fabricmanager: The nvidia-fabricmanager manages NVLink, which is the data transfer +nvidia-fabricmanager: fabric that interconnects NVIDIA data-center GPUs. +nvidia-fabricmanager: +nvidia-fabricmanager: The driver (nvidia-kernel) requires the nvidia-fabricmanager daemon +nvidia-fabricmanager: of the exact same version to initialize GPUs connected by NVLink. +nvidia-fabricmanager: +nvidia-fabricmanager: NVIDIA home page: https://www.nvidia.com/ +nvidia-fabricmanager: NVLink home page: https://www.nvidia.com/en-us/data-center/nvlink/ +nvidia-fabricmanager: |