-
Notifications
You must be signed in to change notification settings - Fork 17
/
apptainer.def
40 lines (32 loc) · 1.22 KB
/
apptainer.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Author: Supreeth Suresh
# Affiliation: National Center for Atmospheric Research, Computational and Information Systems Laboratory
# Created: 03-29-2024
Bootstrap: docker
FROM: ssuresh1809/samurai:nvhpc24_3
%labels
Description This is a container for running samurai on GPU
Author Supreeth Suresh <[email protected]>
%post
mkdir -p /app/
cd /app/
git clone https://github.com/mmbell/samurai.git && \
cd samurai && \
export SAMURAI_ROOT=$(pwd) && \
export LROSE_INSTALL_DIR=/usr/local && \
mkdir build && \
cd build && \
cmake -DUSE_GPU=false -DDEBUG_COMPILE=false .. && \
make -j 8 VERBOSE=1
sed -i 's|data_directory = "/glade/campaign/cisl/asap/samurai/data/beltrami";|data_directory = "/app/data/samurai_data/beltrami";|g' /app/samurai/ncar_scripts/TDRP/beltrami.tdrp
echo "#!/bin/bash \n\
cd /app/samurai/build/release/bin/ \n\
./samurai -params /app/samurai/ncar_scripts/TDRP/beltrami.tdrp\
" > /app/run_samurai.sh
chmod +x /app/run_samurai.sh
%environment
export PATH="/app/samurai/build:${PATH}"
export LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"
export PATH="/usr/local/bin:${PATH}"
%runscript
cd /app/
./run_samurai.sh