Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔨 Investigate compiling openfoam #1

Open
oguzhankoral opened this issue Oct 10, 2023 · 0 comments
Open

🔨 Investigate compiling openfoam #1

oguzhankoral opened this issue Oct 10, 2023 · 0 comments
Assignees

Comments

@oguzhankoral
Copy link
Member

oguzhankoral commented Oct 10, 2023

Compiling lightweight openfoam9 will decrease the size of the layer.

Currently we use it as below but it allocates 1.09 GB

RUN apt-get -y --no-install-recommends install openfoam9

But the source files are around 150 MB, so we can download source files to image and compile ourselves with lightweight version by eliminating unnessary builts.

# Download and compile OpenFOAM 9 manually
WORKDIR /opt
RUN wget -O OpenFOAM-9.tar.gz http://dl.openfoam.org/source/9
RUN mkdir OpenFOAM-9
RUN tar -xzf OpenFOAM-9.tar.gz -C /opt/OpenFOAM-9 --strip-components=1

RUN echo "source /opt/openfoam9/etc/bashrc" >> /root/.bashrc

# Compiling script (tooks more than 1 hour with failed compiling, there is no enough error report why it happenned..)
WORKDIR /opt/OpenFOAM-9
RUN Allwmake

# Cleanup unnecessary files to reduce the image size
RUN rm -rf /opt/OpenFOAM-9.tar.g

The second option requires more know how to compile it properly and feasibilty analysis to understand is it really make sense or not.

@oguzhankoral oguzhankoral self-assigned this Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant