forked from siderolabs/extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpkg.yaml
65 lines (61 loc) · 2.11 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
54
55
56
57
58
59
60
61
62
63
64
65
name: nvidia-container-cli
variant: scratch
shell: /bin/bash
install:
- build-base
- bash
- go
- coreutils
- sed
- curl
- rpcsvc-proto
- patch
dependencies:
- image: cgr.dev/chainguard/wolfi-base@{{ .WOLFI_BASE_REF }}
# nvidia-pkgs depends on glibc,
# so any stage depending on nvidia-container-cli will have the updated ld.so.cache,
# from both nvidia-pkgs and nvidia-container-cli
- stage: nvidia-pkgs
- stage: libseccomp
from: /rootfs
- stage: libcap
from: /rootfs
- stage: elfutils
from: /rootfs
- stage: zlib
from: /rootfs
- stage: libtirpc
from: /rootfs
steps:
- sources:
- url: https://gitlab.com/nvidia/container-toolkit/libnvidia-container/-/archive/{{ .LIBNVIDIA_CONTAINER_VERSION }}/libnvidia-container-{{ .LIBNVIDIA_CONTAINER_VERSION }}.tar.gz
destination: libnvidia-container.tar.gz
sha256: 4beebedd045468e8174895f5d4a563f7880cf7a10f062d996719c061fcdaa0db
sha512: a16f163cb8689f4b6279bed1a5965ee4c56f413918cae6acf272ca5adf7dd929818d977dd6657ce496abeb842b56e03bfd83bda828a7b953625b2999ac174b93
env:
REVISION: {{ .LIBNVIDIA_CONTAINER_REF }}
WITH_NVCGO: yes
WITH_LIBELF: yes
WITH_TIRPC: no # setting no means we'll use the system libtirpc
WITH_SECCOMP: yes
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig # to find runtime libraries compiled in extensions (libseccomp)
PATH: "/usr/bin:{{ .PATH }}" # bldr doesn't have /usr/bin in PATH
prepare:
- |
mkdir libnvidia-container
tar -xzf libnvidia-container.tar.gz --strip-components=1 -C libnvidia-container
build:
- |
cd libnvidia-container
# LDLIBS=-L/usr/local/lib is set so that libnvidia-container-cli libs which are hardcoded as -llibname and not using pkg-config
CPPFLAGS="-I/usr/local/include/tirpc" LDLIBS="-L/usr/local/lib -ltirpc" make
install:
- |
mkdir -p /rootfs
cd libnvidia-container
make install DESTDIR=/rootfs
# run ldconfig to update the cache
/rootfs/usr/local/glibc/sbin/ldconfig -r /rootfs
finalize:
- from: /rootfs
to: /rootfs