diff --git a/ci-wheel.Dockerfile b/ci-wheel.Dockerfile index bb99b56..bb2734d 100644 --- a/ci-wheel.Dockerfile +++ b/ci-wheel.Dockerfile @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 ARG CUDA_VER=notset @@ -81,39 +81,52 @@ RUN <&1 >/dev/null; then + echo "libnccl-dev not found, manually installing it" + LIBRARIES_TO_INSTALL+=(libnccl-dev) + else + echo "libnccl-dev already installed" + fi + + apt-get install -y --no-install-recommends \ + "${LIBRARIES_TO_INSTALL[@]}" + update-ca-certificates add-apt-repository ppa:git-core/ppa add-apt-repository ppa:ubuntu-toolchain-r/test @@ -128,39 +141,51 @@ case "${LINUX_VER}" in dnf update -y dnf install -y epel-release dnf update -y - dnf install -y \ - autoconf \ - automake \ - bzip2 \ - bzip2-devel \ - ca-certificates \ - cmake \ - curl \ - dnf-plugins-core \ - gcc \ - git \ - jq \ - libcudnn8-devel \ - libcurl-devel \ - libffi-devel \ - libtool \ - ncurses-devel \ - numactl \ - numactl-devel \ - openslide-devel \ - openssh-clients \ - patch \ - protobuf-compiler \ - readline-devel \ - sqlite \ - sqlite-devel \ - unzip \ - wget \ - which \ - xz \ - xz-devel \ - zip \ + LIBRARIES_TO_INSTALL=( + autoconf + automake + bzip2 + bzip2-devel + ca-certificates + cmake + curl + dnf-plugins-core + gcc + git + jq + libcudnn8-devel + libcurl-devel + libffi-devel + libtool + ncurses-devel + numactl + numactl-devel + openslide-devel + openssh-clients + patch + protobuf-compiler + readline-devel + sqlite + sqlite-devel + unzip + wget + which + xz + xz-devel + zip zlib-devel + ) + + # only re-install NCCL if there wasn't one already installed in the image + if ! rpm --query --all | grep -E 'libnccl\-devel' > /dev/null 2>&1; then + echo "libnccl-devel not found, manually installing it" + LIBRARIES_TO_INSTALL+=(libnccl-devel) + else + echo "libnccl-devel already installed" + fi + + dnf install -y \ + "${LIBRARIES_TO_INSTALL[@]}" update-ca-trust extract dnf config-manager --set-enabled powertools dnf install -y blas-devel lapack-devel