From 30f6c206baa591987d09f9135a98c035bb2dd1c9 Mon Sep 17 00:00:00 2001 From: Mehmet Oguz Derin Date: Mon, 21 Oct 2024 12:16:08 +0900 Subject: [PATCH 1/4] Support arm64 for CUDA image --- src/nvidia-cuda/install.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/nvidia-cuda/install.sh b/src/nvidia-cuda/install.sh index 37ba7f0f4..c4925e818 100644 --- a/src/nvidia-cuda/install.sh +++ b/src/nvidia-cuda/install.sh @@ -44,9 +44,24 @@ export DEBIAN_FRONTEND=noninteractive check_packages wget ca-certificates +# Determine system architecture and set NVIDIA repository URL accordingly +ARCH=$(uname -m) +case $ARCH in + x86_64) + NVIDIA_ARCH="x86_64" + ;; + aarch64 | arm64) + NVIDIA_ARCH="arm64" + ;; + *) + echo "Unsupported architecture: $ARCH" + exit 1 + ;; +esac + # Add NVIDIA's package repository to apt so that we can download packages # Always use the ubuntu2004 repo because the other repos (e.g., debian11) are missing packages -NVIDIA_REPO_URL="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64" +NVIDIA_REPO_URL="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/$NVIDIA_ARCH" KEYRING_PACKAGE="cuda-keyring_1.0-1_all.deb" KEYRING_PACKAGE_URL="$NVIDIA_REPO_URL/$KEYRING_PACKAGE" KEYRING_PACKAGE_PATH="$(mktemp -d)" From ca37d7a81712d3ea60f8cd12c7b8b7abf4e3828b Mon Sep 17 00:00:00 2001 From: Mehmet Oguz Derin Date: Wed, 9 Apr 2025 13:13:53 +0300 Subject: [PATCH 2/4] Update install.sh --- src/nvidia-cuda/install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/nvidia-cuda/install.sh b/src/nvidia-cuda/install.sh index 9c4c011df..26c99dcfd 100644 --- a/src/nvidia-cuda/install.sh +++ b/src/nvidia-cuda/install.sh @@ -76,6 +76,9 @@ 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" + if [ "$NVIDIA_ARCH" = "arm64" ]; then + echo "Note: arm64 supports limited CUDA versions (11.8, 12.0, 12.1, 12.2)" + fi exit 1 fi @@ -107,6 +110,9 @@ if [ "$INSTALL_CUDNN" = "true" ]; then if ! apt-cache show "$cudnn_pkg_version"; then echo "The requested version of cuDNN is not available: cuDNN $CUDNN_VERSION for CUDA $CUDA_VERSION" + if [ "$NVIDIA_ARCH" = "arm64" ]; then + echo "Note: arm64 has limited cuDNN package availability" + fi exit 1 fi @@ -126,6 +132,9 @@ if [ "$INSTALL_CUDNNDEV" = "true" ]; then fi 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" + if [ "$NVIDIA_ARCH" = "arm64" ]; then + echo "Note: arm64 has limited cuDNN development package availability" + fi exit 1 fi From 951b7c1b7bcd97f38e40c38aa8388d7b87f290ec Mon Sep 17 00:00:00 2001 From: Mehmet Oguz Derin Date: Mon, 30 Jun 2025 08:16:42 +0300 Subject: [PATCH 3/4] Update install.sh --- src/nvidia-cuda/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvidia-cuda/install.sh b/src/nvidia-cuda/install.sh index 17a990fb1..f1f95c948 100644 --- a/src/nvidia-cuda/install.sh +++ b/src/nvidia-cuda/install.sh @@ -77,7 +77,7 @@ 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" if [ "$NVIDIA_ARCH" = "arm64" ]; then - echo "Note: arm64 supports limited CUDA versions (11.8, 12.0, 12.1, 12.2)" + echo "Note: arm64 supports limited CUDA versions (12.4, 12.5, 12.6, 12.8, 12.9)" fi exit 1 fi From 630508cdec995ba8b3ca3f645d89773ce3acc29b Mon Sep 17 00:00:00 2001 From: Mehmet Oguz Derin Date: Thu, 3 Jul 2025 18:30:36 +0300 Subject: [PATCH 4/4] Update note --- src/nvidia-cuda/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nvidia-cuda/install.sh b/src/nvidia-cuda/install.sh index f1f95c948..6de935540 100644 --- a/src/nvidia-cuda/install.sh +++ b/src/nvidia-cuda/install.sh @@ -77,7 +77,8 @@ 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" if [ "$NVIDIA_ARCH" = "arm64" ]; then - echo "Note: arm64 supports limited CUDA versions (12.4, 12.5, 12.6, 12.8, 12.9)" + echo "Note: arm64 supports limited CUDA versions. Please check available versions:" + echo "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/arm64" fi exit 1 fi