Added compatibility matrix for docker-build script (#268)

- matrix -m argument for build-docker.sh that lists compatible OS + ROCm combinations.
- ${DISTRO} is now case-insensitive.
- Added note to README.md to mention this flag.
- Removed --build-arg AMDGPU_RPM=${ROCM_RPM}, which is no longer used
This commit is contained in:
Kian Cossettini
2025-07-08 11:05:14 -04:00
committed by GitHub
parent b0ff07b4fe
commit 67bc147780
5 changed files with 223 additions and 96 deletions
+9 -4
View File
@@ -31,12 +31,17 @@ RUN apt-get update && \
python3 -m pip install 'cmake==3.21'; \
fi
RUN if [ "${ROCM_VERSION}" != "0.0" ]; then \
RUN ROCM_MAJOR=$(echo "${ROCM_VERSION}" | sed 's/\./ /g' | awk '{print $1}') && \
ROCM_MINOR=$(echo "${ROCM_VERSION}" | sed 's/\./ /g' | awk '{print $2}') && \
if [ "${ROCM_MAJOR}" != "0" ] || [ "${ROCM_MINOR}" != "0" ]; then \
OS_VERSION=$(grep '^VERSION_ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"') && \
OS_CODENAME=$(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2) && \
ROCM_MAJOR=$(echo "${ROCM_VERSION}" | sed 's/\./ /g' | awk '{print $1}') && \
ROCM_MINOR=$(echo "${ROCM_VERSION}" | sed 's/\./ /g' | awk '{print $2}') && \
ROCM_VERSN=$(( ("${ROCM_MAJOR}"*10000)+("${ROCM_MINOR}"*100) )) && \
ROCM_PATCH=$(echo "${ROCM_VERSION}" | sed 's/\./ /g' | awk '{print $3}') && \
if [ -z "${ROCM_PATCH}" ] || [ "${ROCM_PATCH}" = "0" ]; then \
ROCM_PATCH=0 && \
ROCM_VERSION=$(echo "${ROCM_VERSION}" | sed 's/\.0$//') \
; fi && \
ROCM_VERSN=$(( ("${ROCM_MAJOR}"*10000)+("${ROCM_MINOR}"*100) + ("${ROCM_PATCH}"))) && \
AMDGPU_DEB="amdgpu-install_${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1_all.deb" && \
wget https://repo.radeon.com/amdgpu-install/${ROCM_VERSION}/ubuntu/${OS_CODENAME}/${AMDGPU_DEB} && \
apt-get install -y ./${AMDGPU_DEB} && \