Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b60f460
Replace local video link with GitHub asset link
filippi Oct 17, 2025
c16cf42
[docker] Faster Docker Rebuilds (#134)
antonio-leblanc Oct 17, 2025
82031cb
Merge branch 'master' into dev
filippi Oct 22, 2025
a570fd3
[docker] Faster docker experience 2 (#135)
antonio-leblanc Oct 26, 2025
d9e3fcc
Merge pull request #138 from forefireAPI/filippi-patch-1
antonio-leblanc Nov 27, 2025
bf9ec1a
Merge branch 'master' into dev
antonio-leblanc Nov 27, 2025
b6df4c5
orcid for antonio
antonio-leblanc Nov 27, 2025
3edb388
Merge branch 'master' into dev
antonio-leblanc Nov 27, 2025
361c250
Merge branch 'dev' of github.com:forefireAPI/forefire into dev
filippi Dec 9, 2025
201f9a1
new interface
filippi Dec 10, 2025
02c5385
cleaning before emit functuon
filippi Dec 11, 2025
f664e7c
Merge branch 'master' into dev
filippi Dec 11, 2025
385ad2a
OK, with new function EMIT
filippi Dec 12, 2025
3cb4f24
sfpe
filippi Dec 12, 2025
2595821
rewrite: Dockerfile as multi-stage build
yanissrairi May 9, 2026
706e486
fix: double-free in FireFront cleanup
yanissrairi May 9, 2026
f7ac80c
[tests] run.bash: fix runANN typo
yanissrairi May 10, 2026
e57edba
[tests] run.bash: remove unreachable ./clean.bash
yanissrairi May 10, 2026
13e23e9
[docker] drop tools/devops old WIP (#144)
yanissrairi May 11, 2026
7f94661
Merge pull request #147 from yanissrairi/feature/dockerfile-multistage
antonio-leblanc May 11, 2026
cf0631a
Merge pull request #145 from yanissrairi/fix/firefront-delete-u
antonio-leblanc May 12, 2026
0d2a05c
Merge pull request #146 from yanissrairi/fix/tests-run-bash-bugs
antonio-leblanc May 13, 2026
b6cb09f
actions v6
antonio-leblanc May 13, 2026
ae2593f
better action names
antonio-leblanc May 16, 2026
51b827c
chore: bump version to v2.3.0
antonio-leblanc Jul 28, 2026
d601cb8
docs: fix broken numbered steps and typos in Quick Start section
antonio-leblanc Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker
name: 📦 Build & Test Docker Image

on:
push:
Expand All @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
lfs: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: macOS
name: 🧪 Test Native (macOS)

on:
push:
Expand All @@ -13,7 +13,7 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
lfs: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux
name: 🧪 Test Native (Linux)

on:
push:
Expand All @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
lfs: true # we use LFS to store large files (e.g. data.nc)

Expand Down
134 changes: 94 additions & 40 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,49 +1,103 @@
FROM ubuntu:22.04

# Install build tools, ForeFire dependencies, AND Python environment
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libnetcdf-c++4-dev \
cmake \
curl \
python3 \
python3-pip \
python3-dev \
git && \
rm -rf /var/lib/apt/lists/*

# Install Python dependencies for testing
RUN pip3 install --no-cache-dir lxml xarray netCDF4
ARG UBUNTU_IMAGE=ubuntu:24.04

WORKDIR /forefire
ENV FOREFIREHOME=/forefire
# Stage 1: builder
FROM ${UBUNTU_IMAGE} AS builder

ARG DEBIAN_FRONTEND=noninteractive

# Keep the BuildKit apt cache mount populated across builds: disable
# docker-clean's post-install hooks AND tell apt to keep downloaded .debs.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \
> /etc/apt/apt.conf.d/keep-cache \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
libnetcdf-c++4-dev \
python3-dev \
python3-pip

WORKDIR /build

# LICENSE is required by CPack at configure time (CMakeLists includes CPack).
COPY --link CMakeLists.txt LICENSE ./
COPY --link app/ ./app/
# tools/ is needed at configure time: CMakeLists.txt invokes
# tools/check_all_lfs.bash and references tools/runANN/ANNTest.cpp.
COPY --link tools/ ./tools/
COPY --link src/ ./src/

RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
&& cmake --build build -j"$(nproc)"

COPY --link bindings/ ./bindings/

# Copy build configuration first (rarely changes)
COPY CMakeLists.txt cmake-build.sh LICENSE ./
RUN --mount=type=cache,target=/root/.cache/pip \
pip3 wheel --no-deps --wheel-dir /wheels ./bindings/python

# Copy source code and applications
COPY src/ ./src/
COPY app/ ./app/
COPY tools/runANN/ ./tools/runANN/

# Build and install the ForeFire C++ library
RUN sh cmake-build.sh
# Stage 2: runtime
FROM ${UBUNTU_IMAGE}

# Add the main forefire executable to the PATH
RUN cp /forefire/bin/forefire /usr/local/bin/
ARG DEBIAN_FRONTEND=noninteractive

# Use pip to install the Python bindings
COPY bindings/ ./bindings/
RUN pip3 install ./bindings/python
ENV FOREFIREHOME=/forefire \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1

# Copy everything else (changes most frequently - docs, tests, etc.)
COPY . .
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \
> /etc/apt/apt.conf.d/keep-cache \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
libnetcdf-c++4-1 \
python3 \
python3-pip \
ca-certificates \
curl

# 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"]
RUN --mount=type=cache,target=/root/.cache/pip \
pip3 install --break-system-packages \
lxml xarray netCDF4

COPY --from=builder --link /build/bin/forefire /usr/local/bin/forefire
COPY --from=builder --link /build/lib/libforefireL.so /usr/local/lib/
COPY --from=builder --link /wheels/ /tmp/wheels/

RUN --mount=type=cache,target=/root/.cache/pip \
pip3 install --break-system-packages /tmp/wheels/*.whl \
&& rm -rf /tmp/wheels \
&& ldconfig

# Non-root user at UID 1000 so files written to mounted volumes get the
# host user's ownership. Ubuntu 24.04 ships a default `ubuntu` user at
# 1000, so we drop it first to free the slot. The /forefire/bin symlink
# keeps `../../bin/forefire` working in test scripts (tests/runff/ff-run.bash:16).
RUN userdel --remove ubuntu 2>/dev/null || true \
&& groupadd --gid 1000 forefire \
&& useradd --gid 1000 --uid 1000 --create-home --shell /bin/bash forefire \
&& mkdir -p /forefire/bin \
&& ln -s /usr/local/bin/forefire /forefire/bin/forefire \
&& chown -R 1000:1000 /forefire

COPY --chown=1000:1000 app/ /forefire/app/
COPY --chown=1000:1000 bindings/ /forefire/bindings/
COPY --chown=1000:1000 tests/ /forefire/tests/
COPY --chown=1000:1000 tools/ /forefire/tools/

LABEL org.opencontainers.image.source="https://github.com/forefireAPI/forefire" \
org.opencontainers.image.documentation="https://forefire.readthedocs.io/" \
org.opencontainers.image.description="ForeFire is an open-source code for wildland fire spread models" \
org.opencontainers.image.licenses="GPL-3.0-or-later" \
org.opencontainers.image.title="forefire"

USER forefire
WORKDIR /forefire

# Set the entrypoint to bash for interactive sessions
CMD ["bash"]
EXPOSE 8000
CMD ["bash"]
Loading
Loading