docker-openfoam (for Docker images) |
|---|
Precompiled OpenFOAM environments for ARM-based processors via Docker.
For use on Macs with Apple silicon and other ARM-based computers.
On an M1 MacBook Air, running the incompressible/simpleFoam/pitzDaily tutorial case took:
-
~80 seconds when using the official Docker environment (which runs under emulation as it is not currently compiled for ARM)
-
~6 seconds using this environment compiled for ARM-based processors
The openfoam-docker-arm script works just like the official openfoam-docker script. Get it in one of these ways:
-
Download using the terminal:
curl -o openfoam-docker-arm https://raw.githubusercontent.com/gerlero/openfoam-docker-arm/main/openfoam-docker-arm chmod +x openfoam-docker-arm
-
Download with Homebrew:
brew install gerlero/openfoam/openfoam-docker-arm
Note: you can also replace
openfoam-docker-armwithopenfoam-dockerin the above command to get theopenfoam-dockerscript.
Then, launch an ARM-based OpenFOAM environment at any time using the script. For example, when installed with Homebrew (prepend ./ if downloaded manually into the current directory):
openfoam-docker-arm -defaultThe -default option requests a full environment (including the tutorial suite and dependencies needed for OpenFOAM development). To ask for a specific OpenFOAM version, pass the version number as an option (e.g., -2212, -2206, -2112 or -2106). For help on how to use the script and OpenFOAM with Docker in general, use the -help option and/or check out the OpenFOAM Docker page.
ARM-based OpenFOAM environments are packaged in Docker images based on OpenSUSE Leap, using the official ARM binaries as recommended in the OpenFOAM Docker FAQ. Note that this means that the base Linux distribution differs from the official Docker images, which use Ubuntu. The ARM-based Docker images are built here using GitHub Actions and uploaded to Docker Hub. Dockerfiles and supporting files are based on those in the official packaging/containers repository.
This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks.
OPENFOAM® is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com.