From fcb2be94ea75e168242915f739479ec614d28376 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 2 Apr 2024 16:55:16 +0100 Subject: [PATCH] FIX: Remove old dockerfile --- share/docker/openfast_ubuntu/Dockerfile | 74 ------------------------- share/docker/openfast_ubuntu/README.md | 42 -------------- 2 files changed, 116 deletions(-) delete mode 100644 share/docker/openfast_ubuntu/Dockerfile delete mode 100644 share/docker/openfast_ubuntu/README.md diff --git a/share/docker/openfast_ubuntu/Dockerfile b/share/docker/openfast_ubuntu/Dockerfile deleted file mode 100644 index e4774eb803..0000000000 --- a/share/docker/openfast_ubuntu/Dockerfile +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 2016-2024 National Renewable Energy Laboratory -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -ARG BASE=ubuntu:jammy - -# Build stage 1: builds openfast. -FROM ${BASE} AS build - -# Install dependencies -# For gfortran-8 -# RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y -# apt-get install gfortran-8 - -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y \ - software-properties-common \ - build-essential \ - cmake \ - cmake-curses-gui \ - gcc \ - gfortran \ - git \ - libblas-dev \ - liblapack-dev \ - make \ - && rm -rf /var/lib/apt/lists/* - -# Copy in the checked-out code version. -WORKDIR /openfast -COPY . . - -# Build the project. -RUN mkdir build -WORKDIR /openfast/build - -# NOTE: building with optimizations on (RELEASE or RELWITHDEBINFO), the virtual machine -# 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" -RUN cmake .. ${CMAKE_OPTIONS} - -ARG BUILD_CORES=4 -RUN make -j${BUILD_CORES} install - -# Build stage 2: provides built openfast in a small image. -FROM ${BASE} as production -COPY --from=build /openfast/install /openfast/install - -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 \ - nano \ - && rm -rf /var/lib/apt/lists/* - -# Make `openfast` command work. -ENV PATH=/openfast/install/bin:$PATH diff --git a/share/docker/openfast_ubuntu/README.md b/share/docker/openfast_ubuntu/README.md deleted file mode 100644 index 371f1a81f1..0000000000 --- a/share/docker/openfast_ubuntu/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# OpenFAST docker images - -## Summary -The `Dockerfile` in this directory can be used to reliably build OpenFAST as a docker image that can be run locally and -in the cloud without much setup. By default, it's based on Ubuntu Jammy and is optimised in size and performance for -production use. A multi-stage build is used, producing an Ubuntu image with just `libblas-dev`, `liblapack-dev`, `nano` -and `openfast` added. The image built by this `Dockerfile` can be customised at build time using build arguments. - -## Image registry -Production images of OpenFAST for the `linux/amd64` platform are available on the -[NREL docker hub](https://hub.docker.com/r/nrel/openfast). - -## 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. | - -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' . -``` - -**NOTE:** This version of the `Dockerfile` is only available in v3.5.3 and up of this repository. To build earlier -versions of OpenFAST, check out the code at that version and recreate the `Dockerfile` from v3.5.3 (or above) in the -checked-out repository first. - -## Building development images -Development images can be built from the production image as a base. Simply start a new `Dockerfile` with: - -```dockerfile -FROM nrel/openfast:3.5.3 -``` - -Images can be built for different platforms using the `--platform` option when building the image.