diff --git a/base.dockerfile b/base.dockerfile index 9491726..c1db6d6 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -1,6 +1,7 @@ # > base stage # Uses official ROCm packages FROM ubuntu:22.04 AS base + ARG ROCM_VERSION="5.7.3" ARG ROCM_APT_CODE_NAME="jammy" ARG ROCBLAS_BRANCH="release/rocm-rel-5.7" diff --git a/blender.dockerfile b/blender.dockerfile index ec8d45c..8b94d1b 100644 --- a/blender.dockerfile +++ b/blender.dockerfile @@ -1,5 +1,7 @@ ARG ROCM_VERSION="5.7.3" + FROM wtongze/rocm-base:${ROCM_VERSION} + ARG HIP_ARCH="gfx803;gfx900" ARG BLENDER_BRANCH="v3.6.15" ARG DEBIAN_FRONTEND="noninteractive" diff --git a/old/Dockerfile b/old/Dockerfile deleted file mode 100644 index 61e64c3..0000000 --- a/old/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 1c1a9fb..0000000 --- a/old/path-fix +++ /dev/null @@ -1,2 +0,0 @@ -# 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 deleted file mode 100644 index 3a58869..0000000 --- a/old/rocm_versions.txt +++ /dev/null @@ -1,128 +0,0 @@ -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 deleted file mode 100644 index e909946..0000000 --- a/old/sudo-nopasswd +++ /dev/null @@ -1,3 +0,0 @@ -# This line grants the any members of the sudo group -# passwordless sudo privileges -%sudo ALL=(ALL) NOPASSWD:ALL diff --git a/old/v3.5.1.text b/old/v3.5.1.text deleted file mode 100644 index 5b4c781..0000000 --- a/old/v3.5.1.text +++ /dev/null @@ -1,12 +0,0 @@ -apt update -apt upgrade -y -apt install wget sudo git -wget -q -O - http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - -apt update -apt install -y rocm-dev rocm-utils rocm-libs miopen-hip miopengemm rccl -export PATH=/opt/rocm-3.5.1/bin:$PATH -# python 3.6 -pip install wheel -python3 setup.py bdist_wheel - -echo "gfx803" >> $ROCM_PATH/bin/target.lst' \ No newline at end of file diff --git a/old/versions.py b/old/versions.py deleted file mode 100644 index ecd727b..0000000 --- a/old/versions.py +++ /dev/null @@ -1,24 +0,0 @@ -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 diff --git a/tensorflow.dockerfile b/tensorflow.dockerfile index b793def..be61f3e 100644 --- a/tensorflow.dockerfile +++ b/tensorflow.dockerfile @@ -1,4 +1,7 @@ -FROM wtongze/rocm-base:5.7.3 +ARG ROCM_VERSION="5.7.3" + +FROM wtongze/rocm-base:${ROCM_VERSION} + ARG TENSORFLOW_BRANCH="r2.11-rocm-enhanced" ARG PYTHON_VERSION="3.11" ARG NUMPY_VERSION="1.22.4" @@ -32,7 +35,7 @@ EOF ENV PATH=$PATH:/home/rocm/.local/bin # TODO: simplify dependencies -# > https://github.com/ROCm/ROCm/issues/1880 +# > Ref: https://github.com/ROCm/ROCm/issues/1880 RUN python${PYTHON_VERSION} -m pip install -U --user pip numpy==${NUMPY_VERSION} wheel packaging requests opt_einsum patchelf RUN python${PYTHON_VERSION} -m pip install -U --user keras_preprocessing --no-deps