-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.model_runner
37 lines (31 loc) · 1.41 KB
/
Dockerfile.model_runner
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
FROM ghcr.io/ncar/music-box:release
# only install pachages that are not in music-box dockerfile
RUN dnf -y install \
python3 \
python3-pip \
sundials-devel \
&& dnf clean all
# copy the python requirements
# in an attempt to cache the pip install between server code edits
COPY ./requirements.txt ./requirements.txt
# python modules needed in scripts
RUN pip3 install -r ./requirements.txt
# copy the interactive server code
COPY . /music-box-interactive/
# create a new directory partmc and copy the partmc code
RUN git clone https://github.com/compdyn/partmc.git
# Create a new directory build in the root directory, and it contains the executable files of partmc
RUN mkdir /build \
&& cd /build \
&& export CAMP_HOME="/camp_build/" \
&& cmake -D CMAKE_BUILD_TYPE=release \
-D CMAKE_C_FLAGS_DEBUG="-g" \
-D CMAKE_Fortran_FLAGS_DEBUG="-g" \
-D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \
-D CMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check" \
-D ENABLE_GSL:BOOL=TRUE \
-D ENABLE_CAMP:BOOL=TRUE \
/partmc \
&& make
# Start the model runner on entry
CMD ["python3", "/music-box-interactive/interactive/rabbit_mq_model_runner.py"]