-
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
59 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,58 @@ | ||
# nvidia rate limits requests. You can get around this by restarting docker if for | ||
# some reason you have to build this image many times | ||
# https://stackoverflow.com/a/75757516/5217293 | ||
# | ||
# Container versions, and sizes, can be found at https://catalog.ngc.nvidia.com/orgs/nvidia/containers/nvhpc/tags | ||
# | ||
FROM nvcr.io/nvidia/nvhpc:23.7-devel-cuda12.2-ubuntu22.04 | ||
|
||
RUN apt update \ | ||
&& apt -y install \ | ||
cmake \ | ||
curl \ | ||
gcc \ | ||
gfortran \ | ||
git \ | ||
lcov \ | ||
libcurl4-openssl-dev \ | ||
libhdf5-dev \ | ||
libnetcdff-dev \ | ||
m4 \ | ||
make \ | ||
nlohmann-json3-dev \ | ||
valgrind \ | ||
vim \ | ||
zlib1g-dev \ | ||
&& apt clean | ||
|
||
# Set environment variables to install MUSICA using gcc | ||
ENV FC=gfortran | ||
ENV FFLAGS="-I/usr/include/" | ||
|
||
# Copy the musica code | ||
COPY . musica | ||
|
||
# Build and install MUSICA | ||
RUN cd musica \ | ||
&& cmake -S . \ | ||
-B build \ | ||
-D MUSICA_ENABLE_TESTS=ON \ | ||
-D MUSICA_ENABLE_TUVX=OFF \ | ||
-D CMAKE_BUILD_TYPE=Debug \ | ||
&& cd build \ | ||
&& make install | ||
|
||
# Set environment variables to build MUSICA-Fortran using intel compilers | ||
ENV CXX=nvc++ | ||
ENV CC=nvc | ||
ENV FC=nvfortran | ||
|
||
RUN cd musica/fortran/test/fetch_content_integration \ | ||
&& mkdir build && cd build \ | ||
&& cmake .. \ | ||
-D CMAKE_BUILD_TYPE=Debug \ | ||
&& make | ||
|
||
RUN cp -r /musica/configs/chapman musica/fortran/test/fetch_content_integration/build | ||
|
||
WORKDIR musica/fortran/test/fetch_content_integration/build |