Skip to content

Commit

Permalink
adding intel dockerfile build
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Jul 22, 2024
1 parent 9b48b5d commit 7beff7d
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- Dockerfile.memcheck
- Dockerfile.mpi
- Dockerfile.mpi.memcheck
- Dockerfile.intel
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
64 changes: 64 additions & 0 deletions docker/Dockerfile.intel
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# versions and sizes from here: https://hub.docker.com/r/intel/oneapi-hpckit/tags
FROM --platform=linux/amd64 intel/oneapi-hpckit:latest

# Based off of this: https://dgpu-docs.intel.com/driver/installation.html#repository-public-key-used-for-package-and-repository-signing
# however those docs (at the time of this writing are incorrect) and this is the correct url
# community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cannot-update-any-packages-using-intel-oneapi-hpckit-latest/m-p/1603192#M36169
RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \
gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics-archive-keyring.gpg

RUN apt update \
&& apt -y install \
cmake \
cmake-curses-gui \
git \
libhdf5-dev \
liblapack-dev \
lcov \
make \
m4 \
python3 \
python3-pip \
valgrind \
vim \
libyaml-cpp-dev \
&& apt clean

# set compilers
ENV CC=icx
ENV CXX=icpx
ENV FC=ifort

# Download netcdf and netcdf-fortran and build and install them with intel
RUN git clone https://github.com/Unidata/netcdf-c.git \
&& cd netcdf-c \
&& mkdir build \
&& cd build \
&& cmake -D CMAKE_BUILD_TYPE=release -D CMAKE_INSTALL_PREFIX=/usr/local .. \
&& make -j 4 \
&& make install

RUN git clone https://github.com/Unidata/netcdf-fortran.git \
&& cd netcdf-fortran \
&& mkdir build \
&& cd build \
&& cmake -D CMAKE_BUILD_TYPE=release -D CMAKE_INSTALL_PREFIX=/usr/local .. \
&& make -j 4 \
&& make install

# Micm
COPY . /tuvx/

# build the library and run the tests
RUN mkdir /build \
&& cd /build \
&& cmake \
-D CMAKE_BUILD_TYPE=release \
-DCMAKE_Fortran_FLAGS="-I/usr/include" \
-DTUVX_ENABLE_REGRESSION_TESTS=OFF \
../tuvx \
&& make

RUN pip3 install numpy scipy

WORKDIR /build

0 comments on commit 7beff7d

Please sign in to comment.