-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnemo.def
66 lines (49 loc) · 1.5 KB
/
nemo.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Bootstrap: localimage
From: fabm.sif
####
##
## Authors: Michael Wathen, Plymouth Marine Laboratory <[email protected]>
##
## Definition file for building NEMO Singularity Containers
##
#####
%files
input_files/arch/nemo-arch/arch-singularity.fcm input_files/arch/nemo-arch/arch-singularity.fcm
%post
git clone https://github.com/pmlmodelling/NEMO4.0-FABM.git nemo
cd nemo
cp /input_files/arch/nemo-arch/* /nemo/arch/PML
echo "Compiling nemo AMM7 Config"
./makenemo -m singularity -r AMM7_FABM -j 8
mkdir /opt/nemo
mv /nemo/cfgs/AMM7_FABM/BLD/bin/nemo.exe /opt/nemo
rm -rf xios
rm -rf nemo
# The above didnt seem to work so blanket chmod for time being
chmod -Rv 755 /opt
# Clean up
rm -rf /var/lib/apt/lists/* /var/lib/dpkg/info/*
%environment
export LD_LIBRARY_PATH=/opt/hdf5/install/lib:$LD_LIBRARY_PATH
%runscript
#!/bin/bash
# This runscript will take 2 arguments: program to run (NEMO or XIOS), and an
# output directory. By default, the output directory will be the job id
# (passed using $SLURM_JOB_ID).
if ! [[ $1 == "nemo" || $1 == "xios" ]]
then
echo "The program argument should be either 'nemo' or 'xios'"
exit 1
fi
if [[ $1 == 'nemo' ]]
then
/opt/nemo/nemo.exe
else
/opt/xios/xios_server.exe
fi
%labels
Author [email protected]
%help
The definition file used to build XIOS:
To build the container, run
singularity build nemo.sif nemo.def