diff --git a/tools/ci_build/github/linux/docker/migraphx-ci-pipeline-env.Dockerfile b/tools/ci_build/github/linux/docker/migraphx-ci-pipeline-env.Dockerfile index fcabe902fd030..976137a33237d 100644 --- a/tools/ci_build/github/linux/docker/migraphx-ci-pipeline-env.Dockerfile +++ b/tools/ci_build/github/linux/docker/migraphx-ci-pipeline-env.Dockerfile @@ -29,6 +29,17 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* +# Upgrade to meet security requirements +RUN apt-get update -y && apt-get upgrade -y && apt-get autoremove -y && \ + apt-get install -y locales cifs-utils wget half libnuma-dev lsb-release && \ + apt-get clean -y + +# Cmake +ENV CMAKE_VERSION=3.31.5 +RUN cd /usr/local && \ + wget -q https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz && \ + tar -zxf /usr/local/cmake-3.31.5-Linux-x86_64.tar.gz --strip=1 -C /usr + # Install Ninja COPY scripts/install-ninja.sh /build_scripts/ RUN /bin/bash /build_scripts/install-ninja.sh @@ -41,10 +52,6 @@ RUN /bin/bash /build_scripts/install-vcpkg.sh RUN groupadd -g 109 render -# Upgrade to meet security requirements -RUN apt-get update -y && apt-get upgrade -y && apt-get autoremove -y && \ - apt-get install -y locales cifs-utils wget half libnuma-dev lsb-release && \ - apt-get clean -y ENV MIGRAPHX_DISABLE_FAST_GELU=1 RUN locale-gen en_US.UTF-8 @@ -54,11 +61,6 @@ ENV LANG C.UTF-8 WORKDIR /stage -# Cmake -ENV CMAKE_VERSION=3.31.5 -RUN cd /usr/local && \ - wget -q https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz && \ - tar -zxf /usr/local/cmake-3.31.5-Linux-x86_64.tar.gz --strip=1 -C /usr # ccache RUN mkdir -p /tmp/ccache && \ diff --git a/tools/ci_build/github/linux/docker/rocm-ci-pipeline-env.Dockerfile b/tools/ci_build/github/linux/docker/rocm-ci-pipeline-env.Dockerfile index e18e7051358fd..ec73647cafc55 100644 --- a/tools/ci_build/github/linux/docker/rocm-ci-pipeline-env.Dockerfile +++ b/tools/ci_build/github/linux/docker/rocm-ci-pipeline-env.Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update && \ sudo \ libelf1 \ kmod \ - file \ + file zip unzip \ python3 \ python3-pip \ rocm-dev \ @@ -49,6 +49,16 @@ RUN cd /usr/local && \ wget -q https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz && \ tar -zxf /usr/local/cmake-3.31.5-Linux-x86_64.tar.gz --strip=1 -C /usr +# Install Ninja +COPY scripts/install-ninja.sh /build_scripts/ +RUN /bin/bash /build_scripts/install-ninja.sh + +# Install VCPKG +ENV VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg +ENV VCPKG_FORCE_SYSTEM_BINARIES=ON +COPY scripts/install-vcpkg.sh /build_scripts/ +RUN /bin/bash /build_scripts/install-vcpkg.sh + # ccache RUN mkdir -p /tmp/ccache && \ cd /tmp/ccache && \ diff --git a/tools/ci_build/github/linux/docker/scripts/install-vcpkg.sh b/tools/ci_build/github/linux/docker/scripts/install-vcpkg.sh new file mode 100755 index 0000000000000..448c2dd7ad32b --- /dev/null +++ b/tools/ci_build/github/linux/docker/scripts/install-vcpkg.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e -x +mkdir -p $VCPKG_INSTALLATION_ROOT +cd $VCPKG_INSTALLATION_ROOT +curl -O -sSL https://github.com/microsoft/vcpkg/archive/refs/heads/master.tar.gz +tar --strip=1 -zxf master.tar.gz +./bootstrap-vcpkg.sh +chmod -R 0777 $VCPKG_INSTALLATION_ROOT