From 45a2d5764cbe2014d09fe5c765da9c9dad0dcfb1 Mon Sep 17 00:00:00 2001 From: Brett Jia Date: Thu, 26 Dec 2024 21:22:30 -0500 Subject: [PATCH] docker: dynamically find amdgpu deb package name (#1666) --- install/docker/install-amd-graphics.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install/docker/install-amd-graphics.sh b/install/docker/install-amd-graphics.sh index 06944b072..b2073b3ba 100644 --- a/install/docker/install-amd-graphics.sh +++ b/install/docker/install-amd-graphics.sh @@ -23,7 +23,13 @@ fi # https://amdgpu-install.readthedocs.io/en/latest/install-prereq.html#installing-the-installer-package -FILENAME="amdgpu-install_6.3.60300-1_all.deb" +FILENAME=$(curl -s -L https://repo.radeon.com/amdgpu-install/latest/ubuntu/$distro/ | grep -o 'amdgpu-install_[^ ]*' | cut -d'"' -f1) +if [ -z "$FILENAME" ] +then + echo "AMD graphics package can not be installed. Could not find the package name." + exit 1 +fi + set -e mkdir -p /tmp/amd cd /tmp/amd