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

Signed-off-by: Gabriel Mougard <[email protected]>
  • Loading branch information
gabrielmougard committed Jun 24, 2024
1 parent 8bbac0e commit 9926572
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 @@ -650,6 +650,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-tag: v1.15.0
source-type: git
build-snaps:
- go
plugin: make
override-prime: |-
[ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0
craftctl default
override-pull: |-
[ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0
craftctl default
override-build: |-
[ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && 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 @@ -1479,6 +1505,7 @@ parts:
- criu
- lxd
- shmounts
- nvidia-container-toolkit
plugin: nil
override-prime: |
set -x
Expand Down

0 comments on commit 9926572

Please sign in to comment.