Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/nvidia-cuda/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "nvidia-cuda",
"version": "1.1.1",
"version": "1.1.2",
"name": "NVIDIA CUDA",
"description": "Installs shared libraries for NVIDIA CUDA.",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/nvidia-cuda",
Expand Down
7 changes: 7 additions & 0 deletions src/nvidia-cuda/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ INSTALL_TOOLKIT=${INSTALLTOOLKIT}
CUDA_VERSION=${CUDAVERSION}
CUDNN_VERSION=${CUDNNVERSION}

. /etc/os-release

if [ "$(id -u)" -ne 0 ]; then
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
exit 1
Expand All @@ -33,6 +35,11 @@ check_packages() {
fi
}
Comment thread
prathameshzarkar9 marked this conversation as resolved.

if [ $VERSION_CODENAME = "bookworm" ] || [ $VERSION_CODENAME = "jammy" ] && [ $CUDA_VERSION \< 11.7 ]; then
echo "(!) Unsupported distribution version '${VERSION_CODENAME}' for CUDA < 11.7"
exit 1
fi

export DEBIAN_FRONTEND=noninteractive

check_packages wget ca-certificates
Expand Down
8 changes: 4 additions & 4 deletions test/nvidia-cuda/install_cudnn_nvxt_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ set -e
# Optional: Import test library
source dev-container-features-test-lib

# Check installation of libcudnn8 (8.3.2)
check "libcudnn.so.8.3.2" test 1 -eq "$(find /usr -name 'libcudnn.so.8.3.2' | wc -l)"
# Check installation of libcudnn8 (8.5.0)
check "libcudnn.so.8.5.0" test 1 -eq "$(find /usr -name 'libcudnn.so.8.5.0' | wc -l)"

# Check installation of cuda-nvtx-11-5 (11.5)
check "cuda-11-5+nvtx" test -e '/usr/local/cuda-11.5/targets/x86_64-linux/include/nvtx3'
# Check installation of cuda-nvtx-11-7 (11.7)
check "cuda-11-7+nvtx" test -e '/usr/local/cuda-11.7/targets/x86_64-linux/include/nvtx3'

# Report result
reportResults
Expand Down
4 changes: 2 additions & 2 deletions test/nvidia-cuda/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"nvidia-cuda": {
"installCudnn": true,
"installNvtx": true,
"cudaVersion": "11.5",
"cudnnVersion": "8.3.2.44"
"cudaVersion": "11.7",
"cudnnVersion": "8.5.0.96"
}
}
}
Expand Down