Skip to content

Commit

Permalink
- remove dcgmproftester libs
Browse files Browse the repository at this point in the history
- remove cudas libs not used
  • Loading branch information
gabrielcocenza committed Sep 14, 2024
1 parent 7f49fda commit 338272e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
39 changes: 39 additions & 0 deletions snap/local/scripts/remove_dcgmproftester.sh
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"
12 changes: 11 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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

0 comments on commit 338272e

Please sign in to comment.