Skip to content

add retry for dnf update command #3077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: r2.19-rocm-enhanced
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ FROM quay.io/pypa/manylinux_2_28_x86_64:2023-11-29-1ba608e as builder
################################################################################

# Add epel and elrepo repos and enable powertools repo
RUN dnf update -y && dnf install -y epel-release && dnf install -y elrepo-release && dnf config-manager --set-enabled powertools
RUN retries=3; for i in $(seq 1 $retries); do dnf update -y && break || sleep $((i * 5)); done && dnf install -y epel-release && dnf install -y elrepo-release && dnf config-manager --set-enabled powertools

# Setup the build_system repo
RUN echo -e "[build_system]\nname=ROCm\nbaseurl=https://repo.almalinux.org/build_system/8/x86_64/\nenabled=1\ngpgcheck=0" >/etc/yum.repos.d/build_system.repo

# Setup c++ dev
# TODO: Only install what is needed
RUN dnf group install -y "Development Tools" && dnf install -y llvm-toolset gcc-toolset-13
RUN retries=3; for i in $(seq 1 $retries); do dnf group install -y "Development Tools" && break || sleep $((i * 5)); done && dnf install -y llvm-toolset gcc-toolset-13

# Install dependencies
COPY setup.packages.rocm.el8.sh setup.packages.rocm.el8.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ set -e
set -x

dnf clean all
dnf update -y
retries=3; for i in $(seq 1 $retries); do dnf update -y && break || sleep $((i * 5)); done
PKG_LIST=$(sed -e '/^\s*#.*$/d' -e '/^\s*$/d' "$1" | sort -u)
dnf --enablerepo=extras,epel,elrepo,powertools,build_system install -y $PKG_LIST