Skip to content

Commit

Permalink
Also provide a Ubuntu image for Intel compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Nov 20, 2023
1 parent c17b63d commit a20b06e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- {dockerfile: 'ubuntu', tag: 'latest'}
- {dockerfile: 'ubuntu', tag: 'rolling', build_args: 'TAG=rolling'}
- {dockerfile: 'ubuntu', tag: 'devel', build_args: 'TAG=devel', continue-on-error: 'true'}
- {dockerfile: 'ubuntu', tag: 'intel', build_args: 'TAG=22.04,INTEL=yes', continue-on-error: 'true'}
- {dockerfile: 'opensuse', tag: 'latest'}
- {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=37,INTEL=yes', continue-on-error: 'true'}
runs-on: ubuntu-latest
Expand Down
12 changes: 12 additions & 0 deletions ubuntu
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ARG TAG=latest
FROM ubuntu:${TAG}

ARG INTEL

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade -y && \
Expand All @@ -9,8 +11,18 @@ RUN apt-get update && \
apt-get purge --autoremove -y && \
rm -rf /var/lib/apt/lists/*

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; \
fi

RUN useradd -m -G sudo -u 1001 kokkos
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER kokkos
ENV PATH=${INTEL:+/opt/intel/oneapi/compiler/latest/linux/bin:/opt/intel/oneapi/compiler/latest/linux/bin/intel64}${PATH:+:}${PATH}
ENV LD_LIBRARY_PATH=${INTEL:+/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64:/opt/intel/oneapi/mkl/latest/lib/intel64}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}
ENV CCACHE_MAXSIZE=250M
WORKDIR /home/kokkos

0 comments on commit a20b06e

Please sign in to comment.