diff --git a/.ci/docker/build.sh b/.ci/docker/build.sh index 078641454b8c6..be9bac304ee65 100755 --- a/.ci/docker/build.sh +++ b/.ci/docker/build.sh @@ -462,12 +462,6 @@ if [[ "$image" == *cuda* && ${OS} == "ubuntu" ]]; then fi fi -if [[ "$image" == *centos9* ]]; then - DOCKERFILE_NAME="Dockerfile.centos.stream" -else - DOCKERFILE_NAME="Dockerfile" -fi - no_cache_flag="" progress_flag="" # Do not use cache and progress=plain when in CI @@ -521,7 +515,7 @@ docker build \ --build-arg "ACL=${ACL:-}" \ --build-arg "SKIP_SCCACHE_INSTALL=${SKIP_SCCACHE_INSTALL:-}" \ --build-arg "SKIP_LLVM_SRC_BUILD_INSTALL=${SKIP_LLVM_SRC_BUILD_INSTALL:-}" \ - -f $(dirname ${DOCKERFILE})/${DOCKERFILE_NAME} \ + -f $(dirname ${DOCKERFILE})/Dockerfile \ -t "$tmp_tag" \ "$@" \ . diff --git a/.ci/docker/centos-rocm/Dockerfile b/.ci/docker/centos-rocm/Dockerfile index a263342eb6fbd..6caca37ef2263 100644 --- a/.ci/docker/centos-rocm/Dockerfile +++ b/.ci/docker/centos-rocm/Dockerfile @@ -1,8 +1,7 @@ ARG CENTOS_VERSION -FROM centos:${CENTOS_VERSION} +FROM quay.io/centos/centos:stream${CENTOS_VERSION} -ARG CENTOS_VERSION # Set AMD gpu targets to build for ARG PYTORCH_ROCM_ARCH @@ -14,20 +13,21 @@ ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH} COPY ./common/install_base.sh install_base.sh RUN bash ./install_base.sh && rm install_base.sh +#Install langpack +RUN yum install -y glibc-langpack-en + # Update CentOS git version RUN yum -y remove git RUN yum -y remove git-* -RUN yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.9-1.x86_64.rpm || \ - (yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo-1.9-1.x86_64.rpm && \ - sed -i "s/packages.endpoint/packages.endpointdev/" /etc/yum.repos.d/endpoint.repo) RUN yum install -y git # Install devtoolset -ARG DEVTOOLSET_VERSION -COPY ./common/install_devtoolset.sh install_devtoolset.sh -RUN bash ./install_devtoolset.sh && rm install_devtoolset.sh +RUN dnf install -y rpmdevtools ENV BASH_ENV "/etc/profile" +# Install ninja +RUN dnf --enablerepo=crb install -y ninja-build + # (optional) Install non-default glibc version ARG GLIBC_VERSION COPY ./common/install_glibc.sh install_glibc.sh @@ -56,7 +56,7 @@ RUN if [ -n "${PROTOBUF}" ]; then bash ./install_protobuf.sh; fi RUN rm install_protobuf.sh ENV INSTALLED_PROTOBUF ${PROTOBUF} -# (optional) Install vision packages like OpenCV +# (optional) Install vision packages like OpenCV and ffmpeg ARG VISION COPY ./common/install_vision.sh ./common/cache_vision_models.sh ./common/common_utils.sh ./ RUN if [ -n "${VISION}" ]; then bash ./install_vision.sh; fi diff --git a/.ci/docker/centos-rocm/Dockerfile.centos.stream b/.ci/docker/centos-rocm/Dockerfile.centos.stream deleted file mode 100644 index 01fea4bb59c42..0000000000000 --- a/.ci/docker/centos-rocm/Dockerfile.centos.stream +++ /dev/null @@ -1,120 +0,0 @@ -ARG CENTOS_VERSION - -FROM quay.io/centos/centos:stream${CENTOS_VERSION} - - -# Set AMD gpu targets to build for -ARG PYTORCH_ROCM_ARCH -ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH} - -# Install required packages to build Caffe2 - -# Install common dependencies (so that this step can be cached separately) -ARG EC2 -COPY ./common/install_base.sh install_base.sh -RUN bash ./install_base.sh && rm install_base.sh - -#Install langpack -RUN yum install -y glibc-langpack-en - -# Update CentOS git version -RUN yum -y remove git -RUN yum -y remove git-* -RUN yum install -y git - -# Install devtoolset -RUN dnf install -y rpmdevtools -ENV BASH_ENV "/etc/profile" - -# Install ninja -RUN dnf --enablerepo=crb install -y ninja-build - -# (optional) Install non-default glibc version -ARG GLIBC_VERSION -COPY ./common/install_glibc.sh install_glibc.sh -RUN if [ -n "${GLIBC_VERSION}" ]; then bash ./install_glibc.sh; fi -RUN rm install_glibc.sh - -# Install user -COPY ./common/install_user.sh install_user.sh -RUN bash ./install_user.sh && rm install_user.sh - -# Install conda and other packages (e.g., numpy, pytest) -ARG ANACONDA_PYTHON_VERSION -ARG CONDA_CMAKE -ARG BUILD_ENVIRONMENT -ENV ANACONDA_PYTHON_VERSION=$ANACONDA_PYTHON_VERSION -ENV PATH /opt/conda/envs/py_$ANACONDA_PYTHON_VERSION/bin:/opt/conda/bin:$PATH -COPY requirements-ci.txt /opt/conda/requirements-ci.txt -COPY ./common/install_conda.sh install_conda.sh -COPY ./common/common_utils.sh common_utils.sh -RUN bash ./install_conda.sh && rm install_conda.sh common_utils.sh /opt/conda/requirements-ci.txt - -# (optional) Install protobuf for ONNX -ARG PROTOBUF -COPY ./common/install_protobuf.sh install_protobuf.sh -RUN if [ -n "${PROTOBUF}" ]; then bash ./install_protobuf.sh; fi -RUN rm install_protobuf.sh -ENV INSTALLED_PROTOBUF ${PROTOBUF} - -# (optional) Install vision packages like OpenCV and ffmpeg -ARG VISION -COPY ./common/install_vision.sh ./common/cache_vision_models.sh ./common/common_utils.sh ./ -RUN if [ -n "${VISION}" ]; then bash ./install_vision.sh; fi -RUN rm install_vision.sh cache_vision_models.sh common_utils.sh -ENV INSTALLED_VISION ${VISION} - -# Install rocm -ARG ROCM_VERSION -COPY ./common/install_rocm.sh install_rocm.sh -RUN bash ./install_rocm.sh -RUN rm install_rocm.sh -COPY ./common/install_rocm_magma.sh install_rocm_magma.sh -RUN bash ./install_rocm_magma.sh -RUN rm install_rocm_magma.sh - -ENV ROCM_PATH /opt/rocm -ENV PATH /opt/rocm/bin:$PATH -ENV PATH /opt/rocm/hcc/bin:$PATH -ENV PATH /opt/rocm/hip/bin:$PATH -ENV PATH /opt/rocm/opencl/bin:$PATH -ENV PATH /opt/rocm/llvm/bin:$PATH -ENV MAGMA_HOME /opt/rocm/magma -ENV LANG en_US.utf8 -ENV LC_ALL en_US.utf8 - -# (optional) Install non-default CMake version -ARG CMAKE_VERSION -COPY ./common/install_cmake.sh install_cmake.sh -RUN if [ -n "${CMAKE_VERSION}" ]; then bash ./install_cmake.sh; fi -RUN rm install_cmake.sh - -# (optional) Install non-default Ninja version -ARG NINJA_VERSION -COPY ./common/install_ninja.sh install_ninja.sh -RUN if [ -n "${NINJA_VERSION}" ]; then bash ./install_ninja.sh; fi -RUN rm install_ninja.sh - -ARG TRITON -# Install triton, this needs to be done before sccache because the latter will -# try to reach out to S3, which docker build runners don't have access -ENV CMAKE_C_COMPILER cc -ENV CMAKE_CXX_COMPILER c++ -COPY ./common/install_triton.sh install_triton.sh -COPY ./common/common_utils.sh common_utils.sh -COPY ci_commit_pins/triton.txt triton.txt -COPY triton_version.txt triton_version.txt -RUN if [ -n "${TRITON}" ]; then bash ./install_triton.sh; fi -RUN rm install_triton.sh common_utils.sh triton.txt triton_version.txt - -# Install ccache/sccache (do this last, so we get priority in PATH) -COPY ./common/install_cache.sh install_cache.sh -ENV PATH /opt/cache/bin:$PATH -RUN bash ./install_cache.sh && rm install_cache.sh - -# Include BUILD_ENVIRONMENT environment variable in image -ARG BUILD_ENVIRONMENT -ENV BUILD_ENVIRONMENT ${BUILD_ENVIRONMENT} - -USER jenkins -CMD ["bash"]