forked from siderolabs/extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpkg.yaml
53 lines (47 loc) · 2.92 KB
/
pkg.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: nvidia-fabricmanager
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
steps:
- sources:
# {{ if eq .ARCH "aarch64" }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://developer.download.nvidia.com/compute/nvidia-driver/redist/fabricmanager/linux-sbsa/fabricmanager-linux-sbsa-{{ .NVIDIA_DRIVER_VERSION }}-archive.tar.xz
destination: fabricmanager.tar.xz
sha256: d0fbe665669a3b68d138bec0edcc4920866935171bf12c24470328d10ca2403b
sha512: c705cc208225b8b83c91cca4a9e363c4862c0fb726e95fd68dd5e6a269620da0f1272138102c12b061c4b3ff20ceee4e35abb3bf8af4adbe1de9411ddec82f6a
# {{ else }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://developer.download.nvidia.com/compute/nvidia-driver/redist/fabricmanager/linux-x86_64/fabricmanager-linux-x86_64-{{ .NVIDIA_DRIVER_VERSION }}-archive.tar.xz
destination: fabricmanager.tar.xz
sha256: e4a4584be24b5408439019fc67b7b4b89bd42d0cba752a709d8b1b071c3b3318
sha512: a9bb0bb7d52b576378f1d767c5b801c6421390aa5d2acc40e2bc2b264c1d1f41b2cd5b166a00e4893654975a20e68a8597c15e467ebaade137fa18a6015609ab
# {{ end }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
prepare:
- |
tar -xf fabricmanager.tar.xz --strip-components=1
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
install:
- |
mkdir -p /rootfs/usr/local/bin \
/rootfs/usr/local/lib \
/rootfs/usr/local/share/nvidia/nvswitch \
/rootfs/usr/local/lib/containers/nvidia-fabricmanager \
/rootfs/usr/local/etc/containers
cp lib/libnvfm.so.1 /rootfs/usr/local/lib/libnvfm.so.1
ln -s libnvfm.so.1 /rootfs/usr/local/lib/libnvfm.so
cp bin/nv-fabricmanager /rootfs/usr/local/bin/
cp bin/nvswitch-audit /rootfs/usr/local/bin/
cp share/nvidia/nvswitch/dgx2_hgx2_topology /rootfs/usr/local/share/nvidia/nvswitch/
cp share/nvidia/nvswitch/dgxa100_hgxa100_topology /rootfs/usr/local/share/nvidia/nvswitch/
cp etc/fabricmanager.cfg /rootfs/usr/local/share/nvidia/nvswitch/
sed -i 's/DAEMONIZE=.*/DAEMONIZE=0/g' /rootfs/usr/local/share/nvidia/nvswitch/fabricmanager.cfg
sed -i 's/STATE_FILE_NAME=.*/STATE_FILE_NAME=\/var\/run\/nvidia-fabricmanager\/fabricmanager.state/g' /rootfs/usr/local/share/nvidia/nvswitch/fabricmanager.cfg
sed -i 's/TOPOLOGY_FILE_PATH=.*/TOPOLOGY_FILE_PATH=\/usr\/local\/share\/nvidia\/nvswitch/g' /rootfs/usr/local/share/nvidia/nvswitch/fabricmanager.cfg
sed -i 's/DATABASE_PATH=.*/DATABASE_PATH=\/usr\/local\/share\/nvidia\/nvswitch/g' /rootfs/usr/local/share/nvidia/nvswitch/fabricmanager.cfg
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/nvidia-fabricmanager.yaml
to: /rootfs/usr/local/etc/containers/nvidia-fabricmanager.yaml
- from: /pkg/manifest.yaml
to: /