diff --git a/.github/workflows/build-docker-image-automatic.yml b/.github/workflows/build-docker-image-automatic.yml index 507d9183b4..b3d16797ba 100644 --- a/.github/workflows/build-docker-image-automatic.yml +++ b/.github/workflows/build-docker-image-automatic.yml @@ -17,8 +17,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 300 env: - DOCKERFILE_PATH: share/docker/openfast_ubuntu/Dockerfile - DOCKERHUB_REPOSITORY: octue/openfast + DOCKERFILE_PATH: share/docker/Dockerfile + DOCKERHUB_REPOSITORY: nrel/openfast steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/build-docker-image-manual.yml b/.github/workflows/build-docker-image-manual.yml index 088854ff93..a569f3ffce 100644 --- a/.github/workflows/build-docker-image-manual.yml +++ b/.github/workflows/build-docker-image-manual.yml @@ -19,9 +19,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 300 env: - DOCKERFILE_PATH: share/docker/openfast_ubuntu/Dockerfile - DOCKERFILE_PERMALINK: https://raw.githubusercontent.com/octue/openfast/update-dockerfiles/share/docker/openfast_ubuntu/Dockerfile - DOCKERHUB_REPOSITORY: octue/openfast + DOCKERFILE_PATH: share/docker/Dockerfile + DOCKERFILE_PERMALINK: https://raw.githubusercontent.com/OpenFAST/openfast/main/share/docker/Dockerfile + DOCKERHUB_REPOSITORY: nrel/openfast steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index 26652ace25..1bd4d7b96b 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -13,8 +13,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 300 env: - DOCKERFILE_PATH: share/docker/openfast_ubuntu/Dockerfile - DOCKERHUB_REPOSITORY: octue/openfast + DOCKERFILE_PATH: share/docker/Dockerfile + DOCKERHUB_REPOSITORY: nrel/openfast steps: - name: Checkout uses: actions/checkout@v4 diff --git a/share/docker/openfast_ubuntu/Dockerfile b/share/docker/Dockerfile similarity index 89% rename from share/docker/openfast_ubuntu/Dockerfile rename to share/docker/Dockerfile index e4774eb803..742d6b0a59 100644 --- a/share/docker/openfast_ubuntu/Dockerfile +++ b/share/docker/Dockerfile @@ -33,8 +33,7 @@ RUN apt-get update -qq && \ gcc \ gfortran \ git \ - libblas-dev \ - liblapack-dev \ + libopenblas-dev \ make \ && rm -rf /var/lib/apt/lists/* @@ -50,7 +49,7 @@ WORKDIR /openfast/build # will require about 6GB of memory. Otherwise, the gfortran compiler will exit with an # "internal error" ENV FC=/usr/bin/gfortran -ARG CMAKE_OPTIONS="-DBUILD_TESTING=OFF -DDOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=RELEASE" +ARG CMAKE_OPTIONS="-DBUILD_TESTING=OFF -DBUILD_FASTFARM=ON -DDOUBLE_PRECISION=OFF -DCMAKE_BUILD_TYPE=RELEASE" RUN cmake .. ${CMAKE_OPTIONS} ARG BUILD_CORES=4 @@ -64,9 +63,9 @@ ARG TIMEZONE=UTC ENV DEBIAN_FRONTEND=noninteractive TZ=${TIMEZONE} RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y \ - libblas-dev \ - liblapack-dev \ + apt-get install --no-install-recommends -y \ + libopenblas-dev \ + libgomp1 \ nano \ && rm -rf /var/lib/apt/lists/* diff --git a/share/docker/openfast_ubuntu/README.md b/share/docker/README.md similarity index 77% rename from share/docker/openfast_ubuntu/README.md rename to share/docker/README.md index 371f1a81f1..82517f7b1f 100644 --- a/share/docker/openfast_ubuntu/README.md +++ b/share/docker/README.md @@ -13,19 +13,19 @@ Production images of OpenFAST for the `linux/amd64` platform are available on th ## Build arguments Provide any of the following build arguments to customise the image at build time. -| Name | Type | Allowed values | Default | Description | -| --------------- | ------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ---------------------------------------------------------------------- |-----------------------------------------------------------| -| `BASE` | String | Any valid docker image URI that has the `apt` package manager installed. | `ubuntu:jammy` | The docker image to base the OpenFAST image on. | -| `CMAKE_OPTIONS` | String | Any number of valid space-separated `cmake` options in the same format they're normally passed to `cmake` directly. See the options relevant to OpenFAST [here.](https://openfast.readthedocs.io/en/main/source/install/index.html#openfast-cmake-options) | `-DBUILD_TESTING=OFF -DDOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=RELEASE` | Options to control how CMake is used to build OpenFAST. | -| `BUILD_CORES` | Integer | Any integer greater than 0. | `4` | The number of cores to use to build OpenFAST with `make`. | -| `TIMEZONE` | String | Any [valid timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). | `UTC` | The timezone to use when running OpenFAST. | +| Name | Type | Allowed values | Default | Description | +| --------------- | ------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|-----------------------------------------------------------| +| `BASE` | String | Any valid docker image URI that has the `apt` package manager installed. | `ubuntu:jammy` | The docker image to base the OpenFAST image on. | +| `CMAKE_OPTIONS` | String | Any number of valid space-separated `cmake` options in the same format they're normally passed to `cmake` directly. See the options relevant to OpenFAST [here.](https://openfast.readthedocs.io/en/main/source/install/index.html#openfast-cmake-options) | `-DBUILD_TESTING=OFF -DBUILD_FASTFARM=ON -DDOUBLE_PRECISION=OFF -DCMAKE_BUILD_TYPE=RELEASE` | Options to control how CMake is used to build OpenFAST. | +| `BUILD_CORES` | Integer | Any integer greater than 0. | `4` | The number of cores to use to build OpenFAST with `make`. | +| `TIMEZONE` | String | Any [valid timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). | `UTC` | The timezone to use when running OpenFAST. | For example, to build OpenFAST v3.5.3 for the `linux/amd64` platform and set `CMAKE_OPTIONS` so the testing tree is built: ```shell # Run from the root of this repository. git checkout v3.5.3 -docker build -f share/docker/openfast_ubuntu/Dockerfile -t openfast:3.5.3 --platform=linux/amd64 --build-arg=CMAKE_OPTIONS='-DBUILD_TESTING=ON' . +docker build -f share/docker/Dockerfile -t openfast:3.5.3 --platform=linux/amd64 --build-arg=CMAKE_OPTIONS='-DBUILD_TESTING=ON' . ``` **NOTE:** This version of the `Dockerfile` is only available in v3.5.3 and up of this repository. To build earlier