Skip to content

gerlero/openfoam-docker-arm

Repository files navigation

OpenFOAM for ARM via Docker

📣 Official Docker images of OpenFOAM v2306 and newer now have ARM variants. These are used automatically by the official openfoam-docker launch script on an ARM-based system.
⚠️ This project is now deprecated. Prefer using the official images and launch script over the ones from this project.
🖥 Using a Mac? If so, you may also want to check out my native OpenFOAM builds for macOS.

Build status Build status Build status Build status Build status Build status Build status homebrew

Precompiled OpenFOAM environments for ARM-based processors via Docker.

For use on Macs with Apple silicon and other ARM-based computers.

Benchmark

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

Usage

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-arm with openfoam-docker in the above command to get the openfoam-docker script.

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 -default

The -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.

Details

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.

Legal notices

Disclaimer

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.

Trademark acknowledgement

OPENFOAM® is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com.