-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
|
||
LIBS_TO_REMOVE=( | ||
"dcgmproftester*" | ||
"libdcgm_cublas_proxy*" | ||
# libs that library linter warn that is unused | ||
# see https://snapcraft.io/docs/linters-library | ||
"libnvperf_dcgm_host.so" | ||
"libnvml_injection.so.1.0" | ||
"libdcgmmodulesysmon.so.*" | ||
"libdcgmmoduleprofiling.so.*" | ||
"libdcgmmodulepolicy.so.*" | ||
"libdcgmmodulenvswitch.so.*" | ||
"libdcgmmoduleintrospect.so.*" | ||
"libdcgmmodulehealth.so.*" | ||
"libdcgmmodulediag.so.*" | ||
"libdcgmmoduleconfig.so.*" | ||
) | ||
|
||
|
||
echo "Removing dcgmproftester libs" | ||
|
||
|
||
for lib in "${LIBS_TO_REMOVE[@]}"; do | ||
find "$SNAPCRAFT_PRIME" -type f -name "$lib" | while read -r file; do | ||
echo "Removing file $file" | ||
rm -f "$file" | ||
done | ||
done | ||
|
||
|
||
echo "Removing libs that are missing cuda libs" | ||
find "$SNAPCRAFT_PRIME" -type d -name "cuda[0-9]*" | while read -r dir; do | ||
echo "Removing directory $dir" | ||
rm -rf "$dir" | ||
done | ||
|
||
echo "Finished cleanup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ summary: Snap for NVIDIA DCGM and DCGM exporter | |
license: Apache-2.0 | ||
contact: [email protected] | ||
description: | | ||
This snap includes NVIDIA DCGM and DCGM exporter to provide GPU monitoring via Prometheus metrics. | ||
This snap includes NVIDIA DCGM and DCGM exporter to provide GPU monitoring via | ||
Prometheus metrics. This snap does not include the dcgmproftester. | ||
platforms: | ||
amd64: | ||
build-on: [amd64] | ||
|
@@ -80,6 +81,15 @@ parts: | |
# Set the Snap version to the same as dcgm deb file | ||
craftctl set version="${DCGM_VERSION#1:}" | ||
cleanup: | ||
after: | ||
- dcgm-exporter | ||
plugin: nil | ||
source: snap/local/scripts | ||
override-prime: | | ||
craftctl default | ||
./scripts/remove_dcgmproftester.sh | ||
layout: | ||
/etc/dcgm-exporter: | ||
symlink: $SNAP/etc/dcgm-exporter |