aboutsummaryrefslogtreecommitdiff
path: root/test/nvidia-cuda/test.sh
diff options
context:
space:
mode:
authorJP Ungaretti <19893438+jungaretti@users.noreply.github.com>2022-08-21 21:22:51 +0300
committerGitHub <noreply@github.com>2022-08-21 21:22:51 +0300
commitea030fa0aef0216c0bc6cb0c3bf0d37ae86c3464 (patch)
treeb41d1d56c9c5c2a739a78f18b24d9d93d1a1d646 /test/nvidia-cuda/test.sh
parentad088a11bbc4cca7b406a754071bc23032fb5ed2 (diff)
Add new NVIDIA CUDA feature (#80)
* Add new Nvidia feature * Remove random empty files * Update comments * Rename feature to nvidia-cuda * Add feature to tests * Add version * Move test to match new name * Add final output message * Fix capitalization of NVIDIA * Remove option for base CUDA * Use camelCase * Check for required packages * Use os-release instead of lsb_release * Clean up keyring variables * Collapse keyring lines * Always install CUDA libraries * Add option to install NVTX * Always use ubuntu2004 repo * Use test instead of brackets * Add default values to feature * Add version options for CUDA and cuDNN * Rename CUDA version option * Add scenario to test specific CUDA/cuDNN version * Rename cuDNN scenario * Fix typo in test scenario * Update variable casing * Add more helpful error messages * Remove default values from script * Use enum for version option * Polish new scenarios * Remove apt_get_update_if_needed and check_packages * Add more versions * Improve error messages * Comments and feature description Co-authored-by: Josh Spicer <joshspicer@github.com>
Diffstat (limited to 'test/nvidia-cuda/test.sh')
-rw-r--r--test/nvidia-cuda/test.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/nvidia-cuda/test.sh b/test/nvidia-cuda/test.sh
new file mode 100644
index 0000000..ef50d7b
--- /dev/null
+++ b/test/nvidia-cuda/test.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Check installation of cuda-libraries-11-<version>
+check "libcudart.so.11.0" test 1 -eq "$(find /usr -name 'libcudart.so.11.0' | wc -l)"
+check "libcublas.so.11" test 1 -eq "$(find /usr -name 'libcublas.so.11' | wc -l)"
+check "libcublasLt.so.11" test 1 -eq "$(find /usr -name 'libcublasLt.so.11' | wc -l)"
+check "libcufft.so.10" test 1 -eq "$(find /usr -name 'libcufft.so.10' | wc -l)"
+check "libcurand.so.10" test 1 -eq "$(find /usr -name 'libcurand.so.10' | wc -l)"
+check "libcusolver.so.11" test 1 -eq "$(find /usr -name 'libcusolver.so.11' | wc -l)"
+check "libcusparse.so.11" test 1 -eq "$(find /usr -name 'libcusparse.so.11' | wc -l)"
+
+# Report result
+reportResults