swan container

This commit is contained in:
Radovan Bast
2025-11-28 10:38:05 +01:00
parent 986befb56b
commit 1049167bb7

29
containers/swan.def Normal file
View File

@@ -0,0 +1,29 @@
Bootstrap: localimage
From: base-layers/03-netcdf.sif
# I just couldn't make it detect Metis
# From: base-layers/04-metis.sif
%post
download_path=/build/swan
cd && git clone https://gitlab.tudelft.nl/citg/wavemodels/swan.git ${download_path}
cd ${download_path}
git switch --detach d7b0472
export FC=mpifort
export NetCDF_ROOT=/opt/netcdf
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DMPI=ON \
-DNETCDF=ON \
-DCMAKE_INSTALL_PREFIX=/opt/swan \
..
make -j $(nproc)
make install
rm -rf ${download_path}
%runscript
/opt/swan/bin/swan.exe