From 86be0530216a8060bc8a243fea8b26ba2fd8315e Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Fri, 5 Apr 2024 09:02:52 -0600 Subject: [PATCH 1/3] Docs: docker from GitHub container repo --- docs/source/install/index.rst | 45 +++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/docs/source/install/index.rst b/docs/source/install/index.rst index 5b4b0db3e8..f5a4415ced 100644 --- a/docs/source/install/index.rst +++ b/docs/source/install/index.rst @@ -157,27 +157,58 @@ containing the executables, and running a simple test command: .. _use_docker: -Use a docker image -~~~~~~~~~~~~~~~~~~ -Multiple versions of OpenFAST are available as docker images from our `docker registry `_. +Running OpenFAST with docker +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +OpenFAST is avilable to be run on docker starting with version 3.5.3. Three approaches are shared below. + +Using a docker image from Docker hub +------------------------------------ +Multiple versions of OpenFAST are also available as docker images from our `docker registry `_. To pull and run one with files from your local machine available, run: .. code-block:: shell - docker run --rm -it --volume=/path/to/files:/files nrel/openfast:3.5.2 openfast /files/main.fst + docker run --rm -it --volume=/path/to/files:/files nrel/openfast:3.5.3 openfast /files/main.fst This command deletes the container (but not the image) when the analysis is finished and leaves the outputs in the same -local directory as the input files. You can also run commands inside the container with: +local directory as the input files. + +You can also run commands interactively inside the container with: .. code-block:: shell - docker run --rm -it --volume=/path/to/files:/files nrel/openfast:3.5.2 /bin/bash + docker run --rm -it --volume=/path/to/files:/files nrel/openfast:3.5.3 /bin/bash + +To pull the latest container, substitute `latest` for `3.5.3` in the above +commands. + + +Using a docker image from GitHub container registry +--------------------------------------------------- +In addition to images hosted on Docker hub, we also host docker images on our +`GitHub container registry `_. +The commands for pulling an image from the GitHub container repository are +similar to those for pulling and running from Docker hub. + +To pull and run with local files: + +.. code-block:: shell + + docker run --rm -it --volume=/path/to/files:/files ghcr.io/OpenFAST/openfast:latest openfast /files/main.fst + +For running the container interactively: + +.. code-block:: shell + + docker run --rm -it --volume=/path/to/files:/files ghcr.io/OpenFAST/openfast:latest /bin/bash + Build your own images -~~~~~~~~~~~~~~~~~~~~~ +--------------------- You can also build your own custom images using our `Dockerfile` or base your images on ours. See `here `_ for more information on this. + .. _compile_from_source: Compile from source From 368c6b2e457a5aa88e2a81f0a1f67381397905ac Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Fri, 5 Apr 2024 09:09:24 -0600 Subject: [PATCH 2/3] docs: update changelog --- docs/changelogs/v3.5.3.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/changelogs/v3.5.3.md b/docs/changelogs/v3.5.3.md index 6c4d5bc7ee..1dc519fcee 100644 --- a/docs/changelogs/v3.5.3.md +++ b/docs/changelogs/v3.5.3.md @@ -59,6 +59,8 @@ Other notable improvements include corrections to turbine indexing when coupled ### Docker builds #2124 Update dockerfile and facilitate nrel/openfast Docker Hub registry, with documentation (@cortadocodes, first time contributor) +#2139 Add final dockerfile updates (@cortadocodes) +#2141 GH actions to push docker image to Github container registry (@mayankchetan, first time contributor) ### GH actions @@ -69,6 +71,8 @@ Other notable improvements include corrections to turbine indexing when coupled ### Documentation #2130 Fix cache failure in Github Actions caused by setup-python (@andrew-platt) +#2144 Edit to readthedocs.io -- Adding Internal Reference Hyperlink for appendixD.rst (@reilandsberger, first time contributor) +#2145 Docs/update for 3.5.3 release (@andrew-platt) ## Solvers From 8242f763840ec5b87b104431071255e58daf5cd9 Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Fri, 5 Apr 2024 13:36:25 -0600 Subject: [PATCH 3/3] Docs: set to `latest` for all example docker commands --- docs/source/install/index.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/source/install/index.rst b/docs/source/install/index.rst index f5a4415ced..85c33ac203 100644 --- a/docs/source/install/index.rst +++ b/docs/source/install/index.rst @@ -168,7 +168,7 @@ To pull and run one with files from your local machine available, run: .. code-block:: shell - docker run --rm -it --volume=/path/to/files:/files nrel/openfast:3.5.3 openfast /files/main.fst + docker run --rm -it --volume=/path/to/files:/files nrel/openfast:latest openfast /files/main.fst This command deletes the container (but not the image) when the analysis is finished and leaves the outputs in the same local directory as the input files. @@ -177,10 +177,9 @@ You can also run commands interactively inside the container with: .. code-block:: shell - docker run --rm -it --volume=/path/to/files:/files nrel/openfast:3.5.3 /bin/bash + docker run --rm -it --volume=/path/to/files:/files nrel/openfast:latest /bin/bash -To pull the latest container, substitute `latest` for `3.5.3` in the above -commands. +To pull a specific release, substitute the version number in place of `latest` in the above commands (i.e. `nrel/openfast:3.5.3`). Using a docker image from GitHub container registry