aboutsummaryrefslogtreecommitdiff
path: root/src/nvidia-cuda/install.sh
diff options
context:
space:
mode:
authorMasahiro Wada <argon.argon.argon@gmail.com>2023-09-27 22:17:31 +0300
committerGitHub <noreply@github.com>2023-09-27 22:17:31 +0300
commit243671eece9c9e3d38b7cecf404acd4ea4bd2f05 (patch)
tree57b27863922f374c9dc14e80c6e46bd63ffd0229 /src/nvidia-cuda/install.sh
parent0d2fc3ad5b9d6bb33a29891c2378a377f0618c9b (diff)
Enhancements in CUDA Support (#699)feature_nvidia-cuda_1.1.0
* add cuda tookit installing support * add nvcc installing support * add libcudnn8-dev installing support * add new cuda versions adn cudnn versions * add specificaitons of new option * remove installNvcc installNvcc process is included in installToolkit * add tests for new nvidia-cuda options * fix wrong scenario name * Revert "add specificaitons of new option" This reverts commit 0dcdb92406e38caa297643eab5af641f814b4f69. README.md should be generated by CI workflow. * make cudnn-dev installation isolated * dump minor version to 1.1.0
Diffstat (limited to 'src/nvidia-cuda/install.sh')
-rw-r--r--src/nvidia-cuda/install.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvidia-cuda/install.sh b/src/nvidia-cuda/install.sh
index f7db18e..cb66d39 100644
--- a/src/nvidia-cuda/install.sh
+++ b/src/nvidia-cuda/install.sh
@@ -6,7 +6,9 @@ set -e
rm -rf /var/lib/apt/lists/*
INSTALL_CUDNN=${INSTALLCUDNN}
+INSTALL_CUDNNDEV=${INSTALLCUDNNDEV}
INSTALL_NVTX=${INSTALLNVTX}
+INSTALL_TOOLKIT=${INSTALLTOOLKIT}
CUDA_VERSION=${CUDAVERSION}
CUDNN_VERSION=${CUDNNVERSION}
@@ -47,6 +49,7 @@ apt-get update -yq
# Ensure that the requested version of CUDA is available
cuda_pkg="cuda-libraries-${CUDA_VERSION/./-}"
nvtx_pkg="cuda-nvtx-${CUDA_VERSION/./-}"
+toolkit_pkg="cuda-toolkit-${CUDA_VERSION/./-}"
if ! apt-cache show "$cuda_pkg"; then
echo "The requested version of CUDA is not available: CUDA $CUDA_VERSION"
exit 1
@@ -67,11 +70,28 @@ if [ "$INSTALL_CUDNN" = "true" ]; then
apt-get install -yq "$cudnn_pkg_version"
fi
+if [ "$INSTALL_CUDNNDEV" = "true" ]; then
+ # Ensure that the requested version of cuDNN development package is available AND compatible
+ cudnn_dev_pkg_version="libcudnn8-dev=${CUDNN_VERSION}-1+cuda${CUDA_VERSION}"
+ if ! apt-cache show "$cudnn_dev_pkg_version"; then
+ echo "The requested version of cuDNN development package is not available: cuDNN $CUDNN_VERSION for CUDA $CUDA_VERSION"
+ exit 1
+ fi
+
+ echo "Installing cuDNN dev libraries..."
+ apt-get install -yq "$cudnn_dev_pkg_version"
+fi
+
if [ "$INSTALL_NVTX" = "true" ]; then
echo "Installing NVTX..."
apt-get install -yq "$nvtx_pkg"
fi
+if [ "$INSTALL_TOOLKIT" = "true" ]; then
+ echo "Installing CUDA Toolkit..."
+ apt-get install -yq "$toolkit_pkg"
+fi
+
# Clean up
rm -rf /var/lib/apt/lists/*