-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |