diff --git a/docker/rockylinux8-vcpkgDockerfile b/docker/rockylinux8-vcpkgDockerfile index b096d6d8f750..8d645e6ae0a8 100644 --- a/docker/rockylinux8-vcpkgDockerfile +++ b/docker/rockylinux8-vcpkgDockerfile @@ -4,9 +4,12 @@ ARG VCPKG_TRIPLET=x64-linux-meshlib FROM rockylinux:8 AS build +COPY scripts/retry.sh /usr/local/bin/retry.sh + RUN echo "install_weak_deps=false" >> /etc/dnf/dnf.conf && \ - dnf -y install epel-release && \ - dnf -y install --enablerepo powertools \ + $(: network may flake ) \ + retry.sh -- dnf -y install epel-release && \ + retry.sh -- dnf -y install --enablerepo powertools \ git cmake gcc-toolset-11 ninja-build clang-devel \ $(: vcpkg requirements ) \ curl zip unzip tar \ @@ -43,7 +46,6 @@ RUN sed -i 's|https://ftp.gnu.org/|https://www.mirrorservice.org/sites/ftp.gnu.o COPY requirements/vcpkg-linux.txt MeshLib/requirements.txt COPY thirdparty/vcpkg/ports MeshLib/ports COPY thirdparty/vcpkg/triplets MeshLib/triplets -COPY scripts/retry.sh /usr/local/bin/retry.sh ARG VCPKG_TRIPLET ENV VCPKG_TRIPLET=$VCPKG_TRIPLET @@ -58,6 +60,7 @@ RUN ./vcpkg export --host-triplet=${VCPKG_TRIPLET} --overlay-triplets=MeshLib/tr FROM nvidia/cuda:12.0.1-devel-rockylinux8 AS production COPY --from=build /opt/vcpkg /opt/vcpkg +COPY scripts/retry.sh /usr/local/bin/retry.sh ENV MR_STATE=DOCKER_BUILD ENV MESHLIB_USE_VCPKG=ON @@ -67,7 +70,8 @@ ARG VCPKG_TRIPLET ENV VCPKG_TRIPLET=$VCPKG_TRIPLET RUN echo "install_weak_deps=false" >> /etc/dnf/dnf.conf && \ - dnf -y install --enablerepo powertools \ + $(: network may flake ) \ + retry.sh -- dnf -y install --enablerepo powertools \ git cmake gcc-toolset-11 ninja-build clang-devel \ $(: vcpkg requirements ) \ curl zip unzip tar \ @@ -81,9 +85,9 @@ RUN echo "install_weak_deps=false" >> /etc/dnf/dnf.conf && \ dnf clean all # install github-cli -RUN dnf -y install 'dnf-command(config-manager)' && \ - dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && \ - dnf -y install gh && \ +RUN retry.sh -- dnf -y install 'dnf-command(config-manager)' && \ + retry.sh -- dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && \ + retry.sh -- dnf -y install gh && \ dnf clean all # install aws cli diff --git a/docker/rockylinux9-vcpkgDockerfile b/docker/rockylinux9-vcpkgDockerfile index 56b364d4df70..22bd8346b175 100644 --- a/docker/rockylinux9-vcpkgDockerfile +++ b/docker/rockylinux9-vcpkgDockerfile @@ -4,8 +4,11 @@ ARG VCPKG_TRIPLET=x64-linux-meshlib FROM rockylinux:9 AS build +COPY scripts/retry.sh /usr/local/bin/retry.sh + RUN echo "install_weak_deps=false" >> /etc/dnf/dnf.conf && \ - dnf -y install --enablerepo crb \ + $(: network may flake ) \ + retry.sh -- dnf -y install --enablerepo crb \ git cmake ninja-build clang-devel \ $(: vcpkg requirements ) \ curl-minimal zip unzip tar \ @@ -32,7 +35,6 @@ RUN sed -i 's|https://ftp.gnu.org/|https://www.mirrorservice.org/sites/ftp.gnu.o COPY requirements/vcpkg-linux.txt MeshLib/requirements.txt COPY thirdparty/vcpkg/ports MeshLib/ports COPY thirdparty/vcpkg/triplets MeshLib/triplets -COPY scripts/retry.sh /usr/local/bin/retry.sh ARG VCPKG_TRIPLET ENV VCPKG_TRIPLET=$VCPKG_TRIPLET @@ -45,6 +47,7 @@ RUN ./vcpkg export --host-triplet=${VCPKG_TRIPLET} --overlay-triplets=MeshLib/tr FROM nvidia/cuda:12.0.1-devel-rockylinux9 AS production COPY --from=build /opt/vcpkg /opt/vcpkg +COPY scripts/retry.sh /usr/local/bin/retry.sh ENV MR_STATE=DOCKER_BUILD ENV MESHLIB_USE_VCPKG=ON @@ -54,7 +57,8 @@ ARG VCPKG_TRIPLET ENV VCPKG_TRIPLET=$VCPKG_TRIPLET RUN echo "install_weak_deps=false" >> /etc/dnf/dnf.conf && \ - dnf -y install --enablerepo crb \ + $(: network may flake ) \ + retry.sh -- dnf -y install --enablerepo crb \ git cmake ninja-build clang-devel \ $(: vcpkg requirements ) \ curl-minimal zip unzip tar \ @@ -68,9 +72,9 @@ RUN echo "install_weak_deps=false" >> /etc/dnf/dnf.conf && \ dnf clean all # install github-cli -RUN dnf -y install 'dnf-command(config-manager)' && \ - dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && \ - dnf -y install gh && \ +RUN retry.sh -- dnf -y install 'dnf-command(config-manager)' && \ + retry.sh -- dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && \ + retry.sh -- dnf -y install gh && \ dnf clean all # install aws cli