features/test-scenarios/install_cudnn_nvxt.sh
JP Ungaretti ea030fa0ae
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>
2022-08-21 14:22:51 -04:00

16 lines
369 B
Bash

#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Check installation of libcudnn8
check "libcudnn.so.8" test 1 -eq "$(find /usr -name 'libcudnn.so.8' | wc -l)"
# Check installation of cuda-nvtx-11-<version>
check "cuda-11+nvtx" test -e '/usr/local/cuda-11/targets/x86_64-linux/include/nvtx3'
# Report result
reportResults