From 54e447855665da3c3c0e8c6609adb2f676c29e26 Mon Sep 17 00:00:00 2001 From: Tongze Wang Date: Sun, 8 Sep 2024 08:58:59 -0700 Subject: [PATCH] first commit --- base.Dockerfile | 23 ++++++++ old/Dockerfile | 20 +++++++ old/path-fix | 2 + old/rocm_versions.txt | 128 ++++++++++++++++++++++++++++++++++++++++++ old/sudo-nopasswd | 3 + old/tf.Dockerfile | 17 ++++++ old/v3.5.1.text | 12 ++++ old/versions.py | 24 ++++++++ 8 files changed, 229 insertions(+) create mode 100644 base.Dockerfile create mode 100644 old/Dockerfile create mode 100644 old/path-fix create mode 100644 old/rocm_versions.txt create mode 100644 old/sudo-nopasswd create mode 100644 old/tf.Dockerfile create mode 100644 old/v3.5.1.text create mode 100644 old/versions.py diff --git a/base.Dockerfile b/base.Dockerfile new file mode 100644 index 0000000..010c4c2 --- /dev/null +++ b/base.Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:22.04 +ARG ROCM_VERSION="5.7.1" +ARG ROCBLAS_BRANCH="release/rocm-rel-5.7" +ARG DEBIAN_FRONTEND="noninteractive" +RUN apt-get update \ +&& apt-get install -y wget git \ +&& rm -rf /var/lib/apt/lists/* +WORKDIR /root +RUN wget -O amdgpu-install.deb https://repo.radeon.com/amdgpu-install/${ROCM_VERSION}/ubuntu/jammy/amdgpu-install_5.7.50701-1_all.deb +RUN dpkg -i amdgpu-install.deb +RUN amdgpu-install -y --no-dkms --usecase=rocm +RUN git clone -b ${ROCBLAS_BRANCH} https://github.com/ROCmSoftwarePlatform/rocBLAS.git +WORKDIR /root/rocBLAS +RUN rm -rf library/src/blas3/Tensile/Logic/asm_full/r9nano/ + +# gfx803 as single target will cause error +RUN sed -i -e 's/rmake.py --install/rmake.py -a="gfx803;gfx900" --install/g' install.sh + +RUN ./install.sh -id --cmake_install +WORKDIR /root + +## need to fix broken version +CMD [ "/bin/bash" ] diff --git a/old/Dockerfile b/old/Dockerfile new file mode 100644 index 0000000..61e64c3 --- /dev/null +++ b/old/Dockerfile @@ -0,0 +1,20 @@ +ARG OS_VERSION=16.04 +FROM ubuntu:${OS_VERSION} +ARG ROCM_VERSION=3.5.1 +RUN < /etc/apt/sources.list.d/rocm.list +apt-get update +DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sudo libelf1 libnuma-dev build-essential git vim-nox cmake-curses-gui kmod file python3 python3-pip rocm-dev +apt-get clean +rm -rf /var/lib/apt/lists/* +EOF +COPY sudo-nopasswd /etc/sudoers.d/sudo-nopasswd +COPY path-fix /etc/sudoers.d/path-fix +RUN useradd --create-home -G sudo,video --shell /bin/bash rocm +USER rocm +WORKDIR /home/rocm +ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/rocm/bin +CMD ["/bin/bash", "-l"] diff --git a/old/path-fix b/old/path-fix new file mode 100644 index 0000000..1c1a9fb --- /dev/null +++ b/old/path-fix @@ -0,0 +1,2 @@ +# This line modifies the secure path +Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/opt/rocm/bin" diff --git a/old/rocm_versions.txt b/old/rocm_versions.txt new file mode 100644 index 0000000..3a58869 --- /dev/null +++ b/old/rocm_versions.txt @@ -0,0 +1,128 @@ +1.9.3 xenial +2.0 xenial +2.1 xenial +2.10.0 xenial +2.10.0-hipclang xenial +2.2 xenial +2.3 xenial +2.4 xenial +2.5 xenial +2.6 xenial +2.7 xenial +2.7.1 xenial +2.7.2 xenial +2.8.0 xenial +2.9.0 xenial +3.0 xenial +3.1 xenial +3.1.1 xenial +3.10 xenial +3.3 xenial +3.5 xenial +3.5.1 xenial +3.7 xenial +3.8 xenial +3.9 xenial +3.9.1 xenial +4.0 xenial +4.0.1 xenial +4.1 xenial +4.1.1 xenial +4.2 ubuntu +4.2 xenial +4.3 ubuntu +4.3 xenial +4.3.1 ubuntu +4.3.1 xenial +4.5 ubuntu +4.5.1 ubuntu +4.5.2 ubuntu +5.0 ubuntu +5.0.1 ubuntu +5.0.2 ubuntu +5.1 ubuntu +5.1.1 ubuntu +5.1.2 ubuntu +5.1.3 ubuntu +5.1.4 ubuntu +5.2 ubuntu +5.2.1 ubuntu +5.2.3 ubuntu +5.2.4 ubuntu +5.2.5 ubuntu +5.3 focal +5.3 jammy +5.3 ubuntu +5.3.2 focal +5.3.2 jammy +5.3.2 ubuntu +5.3.3 focal +5.3.3 jammy +5.3.3 ubuntu +5.4 focal +5.4 jammy +5.4 ubuntu +5.4.1 focal +5.4.1 jammy +5.4.1 ubuntu +5.4.2 focal +5.4.2 jammy +5.4.2 ubuntu +5.4.3 focal +5.4.3 jammy +5.4.3 ubuntu +5.4.5 focal +5.4.5 jammy +5.4.5 ubuntu +5.4.6 focal +5.4.6 jammy +5.4.6 ubuntu +5.5 focal +5.5 jammy +5.5 ubuntu +5.5.1 focal +5.5.1 jammy +5.5.1 ubuntu +5.5.2 focal +5.5.2 jammy +5.5.2 ubuntu +5.5.3 focal +5.5.3 jammy +5.5.3 ubuntu +5.6 focal +5.6 jammy +5.6 ubuntu +5.6.1 focal +5.6.1 jammy +5.6.1 ubuntu +5.7 focal +5.7 jammy +5.7 ubuntu +5.7.1 focal +5.7.1 jammy +5.7.1 ubuntu +5.7.2 focal +5.7.2 jammy +5.7.2 ubuntu +5.7.3 focal +5.7.3 jammy +5.7.3 ubuntu + +6.0 focal +6.0 jammy +6.0 ubuntu +6.0.1 focal +6.0.1 jammy +6.0.1 ubuntu +6.0.2 focal +6.0.2 jammy +6.0.2 ubuntu +6.0.3 focal +6.0.3 jammy +6.0.3 ubuntu +6.1 focal +6.1 jammy +6.1 ubuntu +6.1.1 focal +6.1.1 jammy +6.1.1 ubuntu diff --git a/old/sudo-nopasswd b/old/sudo-nopasswd new file mode 100644 index 0000000..e909946 --- /dev/null +++ b/old/sudo-nopasswd @@ -0,0 +1,3 @@ +# This line grants the any members of the sudo group +# passwordless sudo privileges +%sudo ALL=(ALL) NOPASSWD:ALL diff --git a/old/tf.Dockerfile b/old/tf.Dockerfile new file mode 100644 index 0000000..182a378 --- /dev/null +++ b/old/tf.Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:22.04 +RUN <> $ROCM_PATH/bin/target.lst' \ No newline at end of file diff --git a/old/versions.py b/old/versions.py new file mode 100644 index 0000000..ecd727b --- /dev/null +++ b/old/versions.py @@ -0,0 +1,24 @@ +import requests +from bs4 import BeautifulSoup +import re +from multiprocessing import Pool +import itertools + +base = "https://repo.radeon.com/rocm/apt" + +r = requests.get(base).text +versionPage = BeautifulSoup(r, 'html.parser') +getVersion = lambda e : e.get('href')[:-1] +versions = list(map(getVersion, versionPage.findAll('a', attrs={'href': lambda v: re.match(r'^\d', v)}))) + +def checkVersion(v: str): + r = requests.get(f"{base}/{v}/dists").text + distPage = BeautifulSoup(r, 'html.parser') + codes = distPage.findAll('a', attrs={'href': lambda v: not re.match(r'^[http|\.{2}]', v)}) + return [(v, code.string[:-1]) for code in codes] + +with Pool() as p: + results = p.map(checkVersion, versions) + for r in results: + for (v, c) in r: + print(f"{v}\t{c}") \ No newline at end of file