Skip to content

Commit

Permalink
snapcraft: Add nvidia-ctk as part of the binary tool for Container …
Browse files Browse the repository at this point in the history
…Device Interface spec generation (canonical#470)

related to: canonical/lxd#13562
  • Loading branch information
tomponline authored Jul 26, 2024
2 parents a8a1ab6 + 2b7129f commit 99d3c73
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,32 @@ parts:
- bin/nvidia-container-cli*
- lib/libnvidia-container*.so*

nvidia-container-toolkit:
source: https://github.com/NVIDIA/nvidia-container-toolkit
source-depth: 1
source-commit: a470818ba7d9166be282cd0039dd2fc9b0a34d73 # v1.16.1
source-type: git
build-snaps:
- go
plugin: make
override-prime: |-
[ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "ppc64le" ] && [ "$(uname -m)" != "s390x" ] && exit 0
craftctl default
override-pull: |-
[ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "ppc64le" ] && [ "$(uname -m)" != "s390x" ] && exit 0
craftctl default
override-build: |-
[ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "ppc64le" ] && [ "$(uname -m)" != "s390x" ] && exit 0
set -ex
make binaries
mkdir -p "${CRAFT_PART_INSTALL}/bin/"
cp nvidia-ctk "${CRAFT_PART_INSTALL}/bin/"
organize:
usr/bin/: bin/
prime:
- bin/nvidia-ctk

nvme:
plugin: nil
stage-packages:
Expand Down Expand Up @@ -1485,6 +1511,7 @@ parts:
- criu
- lxd
- shmounts
- nvidia-container-toolkit
plugin: nil
override-prime: |
set -x
Expand Down

0 comments on commit 99d3c73

Please sign in to comment.