Skip to content

Boost problems in nextsim base image #603

@einola

Description

@einola

I'm trying to run valgrind in a nextsim docker container, but it doesn't work anymore. The point is to try to track down the memory leak I may have introduced in a local branch (or maybe it was there before - it's a bit hard to tell).

I found that I can run valgrind on version 7925f86, but not on 996396b. They're quite close in time and a diff between the two points to the nextsim_base and nextsim_base_dev images (see below). The error I get is related to boost, so I'm guessing you updated boost in the nextsim_base image, compared to nextsim_base_dev. Right? Or is it the other way around - I'm confused as to which one of the two is more up-to-date.

Can you update boost again in the nextsim_base image and then I can try again and see if valgrind runs? If it doesn't, then we should downgrade to the version used in the original nextsim_base image.

For now, I'm using --build-arg BASE_IMAGE=nansencenter/nextsim_base_dev:latest. It works, but that's not optimal for the long run.

Monaco:nextsim einola$ git diff 7925f8604ca2355e296a68d3ffb6c9ce2153f7f0..996396b60273ca3afb407bb251c531ba0aad6dc5
diff --git a/Dockerfile b/Dockerfile
index e715ffde..7ff828b4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-ARG BASE_IMAGE=nansencenter/nextsim_base:latest
+ARG BASE_IMAGE=nansencenter/nextsim_base_dev:latest
 FROM $BASE_IMAGE
 
 ENV NEXTSIM_MESH_DIR=/mesh \
diff --git a/README_docker.md b/README_docker.md
index 7787b151..041b9714 100644
--- a/README_docker.md
+++ b/README_docker.md
@@ -46,6 +46,13 @@ This will, of course, crash because no configfile is given to the model. But it
 shows that the model is already compiled and stored inside the image. In the section 4 below see
 how to run the model correctly.
 
+By default the base image will be quite large, it will contain many libraries and Python packages.
+If a smaller image needs to be built with bare minimum of libraries, an extra option should be
+added to the build command:
+```
+docker build . -t nextsim --build-arg BASE_IMAGE=nansencenter/nextsim_base_prod:latest
+```
+
 ## 4. Run the neXtSIM executable inside a container

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions