From 2e40c84375353c2648e136ec28026261cd67ecf2 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 7 Feb 2025 09:41:18 -0700 Subject: [PATCH 1/2] ubuntu: add flang --- ubuntu | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ubuntu b/ubuntu index dadde1d..100efbd 100644 --- a/ubuntu +++ b/ubuntu @@ -7,13 +7,20 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y \ - make git g++ gfortran ccache vim clang llvm wget sudo curl ninja-build clang-format zstd libhwloc-dev libomp-dev gnupg2 cmake libgtest-dev clang-tidy && \ + ccache clang clang-format clang-tidy cmake curl g++ gfortran git gnupg2 libgtest-dev libhwloc-dev libomp-dev llvm make ninja-build sudo vim wget zstd && \ if [ "$(uname -m)" = "x86_64" ]; then \ apt-get install -y gcc-multilib g++-multilib gfortran-multilib; \ fi && \ apt-get purge --autoremove -y && \ rm -rf /var/lib/apt/lists/* +RUN . /etc/os-release && if [ "${VERSION_ID}" != "22.04" ]; then \ + apt-get update && \ + apt-get install -y flang && \ + apt-get purge --autoremove -y && \ + apt-get clean; \ +fi + RUN if [ "${INTEL}" = "yes" ]; then \ wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list && \ From 612321667949782f48c59adab820f30b3b59933f Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 10 Feb 2025 13:13:21 -0700 Subject: [PATCH 2/2] Update ubuntu --- ubuntu | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ubuntu b/ubuntu index 100efbd..a59c0e9 100644 --- a/ubuntu +++ b/ubuntu @@ -14,19 +14,18 @@ RUN apt-get update && \ apt-get purge --autoremove -y && \ rm -rf /var/lib/apt/lists/* -RUN . /etc/os-release && if [ "${VERSION_ID}" != "22.04" ]; then \ - apt-get update && \ - apt-get install -y flang && \ - apt-get purge --autoremove -y && \ - apt-get clean; \ -fi - +# intel build happens on 22.04 LTS, which does not have flang, install flang unconditionally once intel gets bumped RUN if [ "${INTEL}" = "yes" ]; then \ wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list && \ apt-get update && \ apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mkl-devel && \ apt-get clean; \ +else \ + apt-get update && \ + apt-get install -y flang && \ + apt-get purge --autoremove -y && \ + apt-get clean; \ fi RUN useradd -m -G sudo -u 1001 kokkos