x
This commit is contained in:
+20
-11
@@ -15,20 +15,29 @@ RUN dnf -y --refresh --setopt=install_weak_deps=False --setopt=metadata_expire=3
|
|||||||
&& dnf clean all && rm -rf /var/cache/dnf/*
|
&& dnf clean all && rm -rf /var/cache/dnf/*
|
||||||
|
|
||||||
# 2. Install "TheRock" ROCm SDK (Tarball Method)
|
# 2. Install "TheRock" ROCm SDK (Tarball Method)
|
||||||
|
# Note: You can pre-download the tarball to /tmp/therock.tar.gz to speed up build
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
ARG ROCM_MAJOR_VER=7
|
ARG ROCM_MAJOR_VER=7
|
||||||
ARG GFX=gfx120X-all
|
ARG GFX=gfx120X-all
|
||||||
RUN set -euo pipefail; \
|
RUN if [ -f /tmp/therock.tar.gz ]; then \
|
||||||
BASE="https://therock-nightly-tarball.s3.amazonaws.com"; \
|
echo "Using pre-downloaded tarball"; \
|
||||||
PREFIX="therock-dist-linux-${GFX}-${ROCM_MAJOR_VER}"; \
|
else \
|
||||||
KEY="$(curl -s "${BASE}?list-type=2&prefix=${PREFIX}" \
|
set -euo pipefail; \
|
||||||
| tr '<' '\n' \
|
BASE="https://therock-nightly-tarball.s3.amazonaws.com"; \
|
||||||
| grep -o "therock-dist-linux-${GFX}-${ROCM_MAJOR_VER}\..*\.tar\.gz" \
|
PREFIX="therock-dist-linux-${GFX}-${ROCM_MAJOR_VER}"; \
|
||||||
| sort -V | tail -n1)"; \
|
KEY="$(curl -s "${BASE}?list-type=2&prefix=${PREFIX}" \
|
||||||
echo "Downloading Latest Tarball: ${KEY}"; \
|
| tr '<' '\n' \
|
||||||
aria2c -x 16 -s 16 -j 16 --file-allocation=none --async-dns=false --max-overall-download-limit=0 --max-download-limit=0 --min-split-size=1M "${BASE}/${KEY}" -o therock.tar.gz; \
|
| grep -o "therock-dist-linux-${GFX}-${ROCM_MAJOR_VER}\..*\.tar\.gz" \
|
||||||
mkdir -p /opt/rocm; \
|
| sort -V | tail -n1)"; \
|
||||||
tar xzf therock.tar.gz -C /opt/rocm --strip-components=1; \
|
echo "Downloading Latest Tarball: ${KEY}"; \
|
||||||
|
aria2c -x 16 -s 16 -j 16 --file-allocation=none --async-dns=false \
|
||||||
|
--max-overall-download-limit=0 --max-download-limit=0 \
|
||||||
|
--min-split-size=1M --retry-wait=5 --max-tries=0 \
|
||||||
|
--timeout=600 --connect-timeout=60 \
|
||||||
|
"${BASE}/${KEY}" -o therock.tar.gz; \
|
||||||
|
fi && \
|
||||||
|
mkdir -p /opt/rocm && \
|
||||||
|
tar xzf therock.tar.gz -C /opt/rocm --strip-components=1 && \
|
||||||
rm therock.tar.gz
|
rm therock.tar.gz
|
||||||
|
|
||||||
# 3. Configure Global ROCm Environment
|
# 3. Configure Global ROCm Environment
|
||||||
|
|||||||
Reference in New Issue
Block a user