From b60f460f7027d76b05ec08236997f41f53ec4220 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Filippi Date: Fri, 17 Oct 2025 11:33:55 +0200 Subject: [PATCH 1/4] Replace local video link with GitHub asset link Updated video link for Docker quick start instructions. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d42d58d..e9f4dd2 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,12 @@ ## Quick Start with Docker + + + The easiest way to get started is often using Docker and the interactive console with instruction noted below via the **`forefire` command-line interpreter** see in video : - + #### Windows note From c16cf4221b8fce32f69ff577f46c61b906389bd7 Mon Sep 17 00:00:00 2001 From: Antonio Leblanc <56365887+antonio-leblanc@users.noreply.github.com> Date: Fri, 17 Oct 2025 11:01:14 -0300 Subject: [PATCH 2/4] [docker] Faster Docker Rebuilds (#134) * init entrypoint script #125 * docker CP is more optimized --- Dockerfile | 17 +++++++++++++++-- tools/devops/entrypoint.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 tools/devops/entrypoint.sh diff --git a/Dockerfile b/Dockerfile index cbab8ce..3f91524 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,8 +19,12 @@ RUN pip3 install --no-cache-dir lxml xarray netCDF4 WORKDIR /forefire ENV FOREFIREHOME=/forefire -# we could only copy src, cmakelists.txt and cmake-build.sh -COPY . . +# Copy build configuration first (rarely changes) +COPY CMakeLists.txt cmake-build.sh LICENSE ./ + +# Copy source code and tools (changes more frequently) +COPY src/ ./src/ +COPY tools/ ./tools/ # Build and install the ForeFire C++ library RUN sh cmake-build.sh @@ -29,7 +33,16 @@ RUN sh cmake-build.sh RUN cp /forefire/bin/forefire /usr/local/bin/ # Use pip to install the Python bindings +COPY bindings/ ./bindings/ RUN pip3 install ./bindings/python +# Copy everything else (changes most frequently - docs, tests, etc.) +COPY . . + +# WE COULD USE A CUSTOM ENTRYPOINT SCRIPT TO START THE HTTP SERVER AND RUN THE DEMO SIMULATION +# COPY tools/devops/entrypoint.sh /usr/local/bin/entrypoint.sh +# RUN chmod +x /usr/local/bin/entrypoint.sh +# ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] + # Set the entrypoint to bash for interactive sessions CMD ["bash"] \ No newline at end of file diff --git a/tools/devops/entrypoint.sh b/tools/devops/entrypoint.sh new file mode 100644 index 0000000..fa15f6e --- /dev/null +++ b/tools/devops/entrypoint.sh @@ -0,0 +1,34 @@ +#!/bin/bash +set -e + +echo "🔥 ForeFire Quick Start Demo" +echo "==============================" +echo "" + +# Navigate to the test directory +cd /forefire/tests/runff + +echo "📁 Working directory: $(pwd)" +echo "🌐 Starting ForeFire with HTTP server..." +echo "" +echo "Once started, open your browser to: http://localhost:8000" +echo "To run the demo simulation, type: include[real_case.ff]" +echo "To stop, press Ctrl+C" +echo "" + +# Function to handle graceful shutdown +cleanup() { + echo "" + echo "🛑 Shutting down ForeFire..." + exit 0 +} + +# Set up signal handlers for graceful shutdown +trap cleanup SIGINT SIGTERM + +# Start forefire and automatically launch HTTP server +forefire -l & +FOREFIRE_PID=$! + +# Wait for the forefire process +wait $FOREFIRE_PID From a570fd3dc4c213ce3334974ff7c738fb949a9c22 Mon Sep 17 00:00:00 2001 From: Antonio Leblanc <56365887+antonio-leblanc@users.noreply.github.com> Date: Sun, 26 Oct 2025 06:16:42 -0300 Subject: [PATCH 3/4] [docker] Faster docker experience 2 (#135) * init entrypoint script #125 * docker CP is more optimized * move forefire executable code to /app * final docker * comment --- CMakeLists.txt | 2 +- Dockerfile | 5 +++-- {tools => app}/forefire/AdvancedLineEditor.cpp | 0 {tools => app}/forefire/AdvancedLineEditor.hpp | 0 {tools => app}/forefire/ForeFire.cpp | 0 {tools => app}/forefire/commands.md | 0 src/include/Version.h | 2 +- 7 files changed, 5 insertions(+), 4 deletions(-) rename {tools => app}/forefire/AdvancedLineEditor.cpp (100%) rename {tools => app}/forefire/AdvancedLineEditor.hpp (100%) rename {tools => app}/forefire/ForeFire.cpp (100%) rename {tools => app}/forefire/commands.md (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e9682e..1223995 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,7 +159,7 @@ endif() # ---------------------------------- # Main Project Executable # ---------------------------------- -set(INTERPRETER tools/forefire/ForeFire.cpp tools/forefire/AdvancedLineEditor.cpp) +set(INTERPRETER app/forefire/ForeFire.cpp app/forefire/AdvancedLineEditor.cpp) add_executable(forefire ${INTERPRETER}) if(DEFINED NETCDF_STATIC_LIBS) if(MPI_FOUND) diff --git a/Dockerfile b/Dockerfile index 3f91524..fb1225d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,9 +22,10 @@ ENV FOREFIREHOME=/forefire # Copy build configuration first (rarely changes) COPY CMakeLists.txt cmake-build.sh LICENSE ./ -# Copy source code and tools (changes more frequently) +# Copy source code and applications COPY src/ ./src/ -COPY tools/ ./tools/ +COPY app/ ./app/ +COPY tools/runANN/ ./tools/runANN/ # Build and install the ForeFire C++ library RUN sh cmake-build.sh diff --git a/tools/forefire/AdvancedLineEditor.cpp b/app/forefire/AdvancedLineEditor.cpp similarity index 100% rename from tools/forefire/AdvancedLineEditor.cpp rename to app/forefire/AdvancedLineEditor.cpp diff --git a/tools/forefire/AdvancedLineEditor.hpp b/app/forefire/AdvancedLineEditor.hpp similarity index 100% rename from tools/forefire/AdvancedLineEditor.hpp rename to app/forefire/AdvancedLineEditor.hpp diff --git a/tools/forefire/ForeFire.cpp b/app/forefire/ForeFire.cpp similarity index 100% rename from tools/forefire/ForeFire.cpp rename to app/forefire/ForeFire.cpp diff --git a/tools/forefire/commands.md b/app/forefire/commands.md similarity index 100% rename from tools/forefire/commands.md rename to app/forefire/commands.md diff --git a/src/include/Version.h b/src/include/Version.h index 6d3ab43..759b7ed 100644 --- a/src/include/Version.h +++ b/src/include/Version.h @@ -1,3 +1,3 @@ #pragma once -const char* ff_version = "v2.2.0"; +const char* ff_version = "v2.2.1"; From b6df4c5f9ce89c0ca7ca09b062b9f485e860e94c Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 27 Nov 2025 13:52:15 -0300 Subject: [PATCH 4/4] orcid for antonio --- paper/paper.md | 1 + 1 file changed, 1 insertion(+) diff --git a/paper/paper.md b/paper/paper.md index 95190fd..e3a8418 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -59,6 +59,7 @@ authors: corresponding: false - name: Antonio Leblanc affiliation: 4 + orcid: 0009-0001-9043-2039 corresponding: false - name: Alberto Alonso-Pinar orcid: 0009-0009-2051-9700