forked from rapidsai/devcontainers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprune-static-libs.sh
More file actions
executable file
·21 lines (18 loc) · 867 Bytes
/
prune-static-libs.sh
File metadata and controls
executable file
·21 lines (18 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
if test -n "${libcutensorMg_static:+x}" && test -f "${libcutensorMg_static}"; then
rm -rf "${libcutensorMg_static}";
(update-alternatives --remove-all libcutensorMg_static.a >/dev/null 2>&1 || true);
fi
if test -n "${libcutensor_static:+x}" && test -f "${libcutensor_static}"; then
rm -rf "${libcutensor_static}";
(update-alternatives --remove-all libcutensor_static.a >/dev/null 2>&1 || true);
fi
find /usr/lib/ \
\( -type f -or -type l \) \
\( -name 'libnccl*.a' -or -name 'libcudnn*.a' \) \
-delete \
|| true;
for dir in "lib" "lib64"; do
find "$(realpath -m "${CUDA_HOME}/${dir}")/" -type f \
\( -name '*.a' ! -name 'libnvptxcompiler_static.a' ! -name 'libcudart_static.a' ! -name 'libcudadevrt.a' ! -name 'libculibos.a' \) \
-delete || true;
done