CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] Dockerfile for OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By ukaya
  • 2 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 26, 2022, 05:51
Default Dockerfile for OpenFOAM
  #1
New Member
 
Marius
Join Date: Aug 2020
Location: Germany
Posts: 10
Rep Power: 5
Muerio is on a distinguished road
Hello,

does anyone know, whether the Dockerfiles used for building the images offered on the openfoam.org download page are publicly available?

Where would I find these?

Thanks in advance
Muerio is offline   Reply With Quote

Old   November 8, 2022, 09:03
Default
  #2
New Member
 
Umut Kaya
Join Date: Aug 2020
Posts: 5
Rep Power: 5
ukaya is on a distinguished road
Hi Muerio,

In the installation instructions in step 4, it asks you to download and run this script:
Code:
http://dl.openfoam.org/docker/openfoam10-linux
There you can see that the image is: openfoam/openfoam10-paraview56 for the current version. On docker hub (https://hub.docker.com/r/openfoam/op...araview56/tags), by clicking on the tag you can view the steps that constitues the docker image.

I am not sure if the text versions of the openfoam releases are stored elsewhere.
ukaya is offline   Reply With Quote

Old   November 9, 2022, 02:01
Default
  #3
New Member
 
Marius
Join Date: Aug 2020
Location: Germany
Posts: 10
Rep Power: 5
Muerio is on a distinguished road
Hi ukaya,

thank you for your reply.

I already looked at the details for the individual tags.
Unfortunately you can't get all the information you need from it.
Especially the files copied into the images.

I really hoped to find a repository of the Dockerfile somewhere so I could fork the entire setup and use it to build the image on a more frequent basis.
Muerio is offline   Reply With Quote

Old   November 15, 2022, 10:08
Default
  #4
New Member
 
Umut Kaya
Join Date: Aug 2020
Posts: 5
Rep Power: 5
ukaya is on a distinguished road
Hi Muerio,

You are right. Nevertheless, more or less the only critical step is "apt-get install ..."

I have come across these dockerfiles: https://github.com/PawseySC/pawsey-containers, which I use for building docker images for debugging openfoam. You might find them useful.

Cheers
Muerio likes this.
ukaya is offline   Reply With Quote

Old   December 8, 2022, 10:15
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Muerio View Post
Hi ukaya,

thank you for your reply.

I already looked at the details for the individual tags.
Unfortunately you can't get all the information you need from it.
Especially the files copied into the images.

I really hoped to find a repository of the Dockerfile somewhere so I could fork the entire setup and use it to build the image on a more frequent basis.


The www.openfoam.com docker files are publicly available, and their use for making your own images is actively encouraged.
https://develop.openfoam.com/packaging/containers


contains templates for a variety of distributions and different compositions of openfoam. The nss-wrapper solution corresponds to the openfoam-docker start script, but there are also some chroot versions that can be useful while building content.


EDIT: just added some preliminary definition files for apptainer/singularity (doesn't need nss-wrapper at all).
Muerio and ukaya like this.

Last edited by olesen; December 13, 2022 at 13:33.
olesen is offline   Reply With Quote

Old   March 13, 2023, 23:46
Default
  #6
New Member
 
Alexis Espinosa
Join Date: Aug 2009
Location: Australia
Posts: 20
Rep Power: 16
alexisespinosa is on a distinguished road
Thanks a lot for that.
Anyone knows about a repository with the Dockerfiles for the OpenFOAM.org flavour?
(Although after having a look to those for ESI flavour, the recipes are indeed not particularly useful for my purposes, as they are simple installations using apt-get install rather than an installation from source. I guess Dockerfiles from the "Foundation" flavour are going to be the same, simple use of apt-get install within an Ubuntu container.)
alexisespinosa is offline   Reply With Quote

Old   March 15, 2023, 09:43
Default
  #7
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by alexisespinosa View Post
Thanks a lot for that.
Anyone knows about a repository with the Dockerfiles for the OpenFOAM.org flavour?
(Although after having a look to those for ESI flavour, the recipes are indeed not particularly useful for my purposes, as they are simple installations using apt-get install rather than an installation from source. I guess Dockerfiles from the "Foundation" flavour are going to be the same, simple use of apt-get install within an Ubuntu container.)

If you dig deeper on https://develop.openfoam.com/packaging/containers you will notice there are actually some additional files there too.
The https://develop.openfoam.com/packagi...ntu.Dockerfile (for example) sets up a container for building OpenFOAM. You can then either use/reuse a deb file for building, following the packages debian rules, or else simply do a regular OpenFOAM build (ie, with wmake) after using foamConfigurePaths to select system components for scotch, mpi, etc.


An alternative approach is noted in the wiki information: https://develop.openfoam.com/packagi...s/-/wikis/home


This describes using a rocky image for building the binary content and then re-deploying that content for a UBI (RedHat binary image). Not sure what other combinations you'd want.


/mark
olesen is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:40.