Skip to content

Commit

Permalink
Merge pull request #3 from Pressio/add-kokkos-container
Browse files Browse the repository at this point in the history
Add GNU with kokkos dockerfile
  • Loading branch information
fnrizzi authored Nov 10, 2024
2 parents c687d08 + d69c1b2 commit 0dd9f1b
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ jobs:
strategy:
matrix:
config:
- {dockerfile: 'fedora-clang', compiler-version: '17', tag: 'latest'}
- {dockerfile: 'fedora-gnu', compiler-version: '13', tag: 'latest'}
# - {dockerfile: 'intel-oneapi', compiler-version: 'latest'}
- {dockerfile: 'ubuntu-clang', compiler-version: '14', tag: 'latest'}
- {dockerfile: 'ubuntu-gnu-trilinos', compiler-version: '11', tag: 'ef73d14'}
- {dockerfile: 'ubuntu-gnu-trilinos', compiler-version: '11', tag: '702aac5'}
- {dockerfile: 'ubuntu-gnu-trilinos', compiler-version: '11', tag: 'trilinos-release-14-4-0'}
- {dockerfile: 'ubuntu-gnu', compiler-version: '11', tag: 'latest'}
- {dockerfile: 'fedora-clang', compiler-version: '17', tag: 'latest'}
- {dockerfile: 'fedora-gnu', compiler-version: '13', tag: 'latest'}
# - {dockerfile: 'intel-oneapi', compiler-version: 'latest'}
- {dockerfile: 'ubuntu-clang', compiler-version: '14', tag: 'latest'}
- {dockerfile: 'ubuntu-gnu-trilinos', compiler-version: '11', tag: 'ef73d14'}
- {dockerfile: 'ubuntu-gnu-trilinos', compiler-version: '11', tag: '702aac5'}
- {dockerfile: 'ubuntu-gnu-trilinos', compiler-version: '11', tag: 'trilinos-release-14-4-0'}
- {dockerfile: 'ubuntu-gnu', compiler-version: '11', tag: 'latest'}
- {dockerfile: 'ubuntu-gnu-kokkos-cpu-openmp', compiler-version: '11', tag: 'latest'}
- {dockerfile: 'ubuntu-gnu-kokkos-cpu-serial', compiler-version: '11', tag: 'latest'}

runs-on: ubuntu-latest

Expand Down
56 changes: 56 additions & 0 deletions docker_scripts/ubuntu-gnu-kokkos-cpu-openmp.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}

ARG COMPILER_VERSION=11

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y -q && \
apt-get upgrade -y -q && \
apt-get install -y -q --no-install-recommends \
ca-certificates \
cmake \
gfortran-${COMPILER_VERSION} \
gcc-${COMPILER_VERSION} \
g++-${COMPILER_VERSION} \
libblas-dev \
liblapack-dev \
git \
libgtest-dev \
make \
software-properties-common \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ENV FC=/usr/bin/gfortran-${COMPILER_VERSION}
ENV CC=/usr/bin/gcc-${COMPILER_VERSION}
ENV CXX=/usr/bin/g++-${COMPILER_VERSION}

RUN mkdir /kokkos && \
cd /kokkos && \
mkdir build install && \
wget https://github.com/kokkos/kokkos/releases/download/4.4.01/kokkos-4.4.01.tar.gz && \
tar -xzvf kokkos-4.4.01.tar.gz && \
cmake -S kokkos-4.4.01 -B build -DCMAKE_INSTALL_PREFIX=install -DKokkos_ENABLE_OPENMP=On && \
cd build && \
make -j$(nproc) && \
make install

RUN mkdir /kokkos-kernels && \
cd /kokkos-kernels && \
mkdir build install && \
wget https://github.com/kokkos/kokkos-kernels/releases/download/4.4.01/kokkos-kernels-4.4.01.tar.gz && \
tar -xzvf kokkos-kernels-4.4.01.tar.gz && \
cmake \
-S kokkos-kernels-4.4.01 \
-B build \
-DCMAKE_INSTALL_PREFIX=install \
-DKokkos_ROOT=/kokkos/install \
-DKokkosKernels_INST_DOUBLE=On \
-DKokkosKernels_INST_LAYOUTRIGHT=On \
-DKokkosKernels_INST_LAYOUTLEFT=On \
-DKokkosKernels_ENABLE_TPL_BLAS=ON && \
cd build && \
make -j$(nproc) && \
make install
56 changes: 56 additions & 0 deletions docker_scripts/ubuntu-gnu-kokkos-cpu-serial.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}

ARG COMPILER_VERSION=11

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y -q && \
apt-get upgrade -y -q && \
apt-get install -y -q --no-install-recommends \
ca-certificates \
cmake \
gfortran-${COMPILER_VERSION} \
gcc-${COMPILER_VERSION} \
g++-${COMPILER_VERSION} \
libblas-dev \
liblapack-dev \
git \
libgtest-dev \
make \
software-properties-common \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ENV FC=/usr/bin/gfortran-${COMPILER_VERSION}
ENV CC=/usr/bin/gcc-${COMPILER_VERSION}
ENV CXX=/usr/bin/g++-${COMPILER_VERSION}

RUN mkdir /kokkos && \
cd /kokkos && \
mkdir build install && \
wget https://github.com/kokkos/kokkos/releases/download/4.4.01/kokkos-4.4.01.tar.gz && \
tar -xzvf kokkos-4.4.01.tar.gz && \
cmake -S kokkos-4.4.01 -B build -DCMAKE_INSTALL_PREFIX=install && \
cd build && \
make -j$(nproc) && \
make install

RUN mkdir /kokkos-kernels && \
cd /kokkos-kernels && \
mkdir build install && \
wget https://github.com/kokkos/kokkos-kernels/releases/download/4.4.01/kokkos-kernels-4.4.01.tar.gz && \
tar -xzvf kokkos-kernels-4.4.01.tar.gz && \
cmake \
-S kokkos-kernels-4.4.01 \
-B build \
-DCMAKE_INSTALL_PREFIX=install \
-DKokkos_ROOT=/kokkos/install \
-DKokkosKernels_INST_DOUBLE=On \
-DKokkosKernels_INST_LAYOUTRIGHT=On \
-DKokkosKernels_INST_LAYOUTLEFT=On \
-DKokkosKernels_ENABLE_TPL_BLAS=ON && \
cd build && \
make -j$(nproc) && \
make install

0 comments on commit 0dd9f1b

Please sign in to comment.