1
1
# parts of CAM require x86 architecture (gptl, which relies on the rdtsc x86 assembly instruction)
2
2
# esmf is am image you are expected to have built. Read the README file for instructions
3
- FROM esmf:latest
3
+ FROM --platform=linux/amd64 esmf:latest
4
4
5
5
###################################################
6
6
## Install necessary packages
@@ -11,13 +11,18 @@ RUN dnf -y update \
11
11
git \
12
12
hostname \
13
13
m4 \
14
- python \
14
+ python39 \
15
+ pip \
15
16
sudo \
16
17
svn \
17
18
tree \
18
19
vim \
19
20
&& dnf clean all
20
21
22
+ RUN ln -s $(which python3) /usr/bin/python && \
23
+ pip install --upgrade pip && \
24
+ pip install --upgrade setuptools
25
+
21
26
###################################################
22
27
## Make sure the mpi compilers can be found
23
28
###################################################
@@ -36,37 +41,22 @@ RUN cd pnetcdf-1.12.3 && \
36
41
37
42
ENV FC=gfortran
38
43
39
- ###################################################
40
- ## Build and install json-fortran
41
- ###################################################
42
- RUN curl -LO https://github.com/jacobwilliams/json-fortran/archive/8.2.0.tar.gz \
43
- && tar -zxvf 8.2.0.tar.gz \
44
- && cd json-fortran-8.2.0 \
45
- && mkdir build \
46
- && cd build \
47
- && cmake -D SKIP_DOC_GEN:BOOL=TRUE .. \
48
- && make install -j 8
49
-
50
- # add a symlink
51
- RUN ln -s /usr/local/jsonfortran-gnu-8.2.0/lib/libjsonfortran.a /usr/local/lib/libjsonfortran.a
52
-
53
44
###################################################
54
45
## Build and install MUSICA
55
46
###################################################
56
47
57
- RUN git clone https://github.com/NCAR/musica.git
48
+ RUN git clone https://github.com/NCAR/musica.git \
49
+ && cd musica \
50
+ && git checkout 2a5eeaac982a3eb80b96d1e2087b91b301d1e748
51
+
58
52
RUN mkdir /musica/build \
59
53
&& cd /musica/build \
60
- && export JSON_FORTRAN_HOME="/usr/local/jsonfortran-gnu-8.2.0" \
61
54
&& cmake \
62
55
-D ENABLE_TESTS=OFF \
63
- -D ENABLE_TUVX=OFF \
64
- .. \
56
+ -D MUSICA_BUILD_FORTRAN_INTERFACE=ON \
57
+ .. \
65
58
&& make install -j 8
66
59
67
- # add a symlink
68
- RUN ln -s /usr/local/musica-0.3.0/lib64/libmusica.a /usr/local/lib/libmusica.a
69
-
70
60
###################################################
71
61
## Build CAM-SIMA
72
62
###################################################
@@ -83,7 +73,7 @@ USER cam_sima_user
83
73
WORKDIR /home/cam_sima_user/CAM-SIMA
84
74
85
75
# pull the dependencies
86
- RUN ./manage_externals/checkout_externals
76
+ RUN ./bin/git-fleximod update
87
77
88
78
# Copy in the machine information for the container
89
79
RUN cp /home/cam_sima_user/CAM-SIMA/docker/config_machines.xml /home/cam_sima_user/CAM-SIMA/ccs_config/machines/
@@ -104,7 +94,7 @@ WORKDIR $CASE_NAME
104
94
RUN ./case.setup
105
95
106
96
RUN ./xmlchange CAM_CONFIG_OPTS="--dyn none --physics-suites musica"
107
- RUN ./xmlchange CAM_LINKED_LIBS="-lmusica -ljsonfortran "
97
+ RUN ./xmlchange CAM_LINKED_LIBS="-lmusica-fortran -lmusica -lyaml-cpp "
108
98
RUN ./xmlchange ROF_NCPL=48
109
99
RUN ./xmlchange STOP_OPTION=nsteps
110
100
RUN ./xmlchange STOP_N=5
0 commit comments