mirror of
https://github.com/siderolabs/extensions.git
synced 2025-09-29 09:31:28 +02:00
67 lines
2.2 KiB
YAML
67 lines
2.2 KiB
YAML
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:
|
|
SOURCE_DATE_EPOCH: {{ .BUILD_ARG_SOURCE_DATE_EPOCH }}
|
|
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
|