Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2168e5f
add **/sims to .gitignore
jordan-evens Jul 30, 2025
de9440d
move python to ./src/py
jordan-evens Jul 30, 2025
43bd7b2
fix .dockerignore to not include non-python files in src/py
jordan-evens Jul 30, 2025
148975b
remove /home/user/.cache and all __pycache__ directories from image
jordan-evens Jul 30, 2025
02fccd2
remove -svc containers and switch name to firestarr-app-dev
jordan-evens Jul 30, 2025
8b9ac19
remove unused crontab from old -svc containers
jordan-evens Jul 30, 2025
df83d2e
add firestarr-dev container for c++ dev
jordan-evens Jul 30, 2025
55ada7b
move files out of ./firestarr
jordan-evens Jul 30, 2025
ebd6cb4
v0.9.5.5
jordan-evens Jul 30, 2025
59eedad
add code changes from live azure container
jordan-evens Apr 27, 2026
c4567af
move cpp code into submodule
jordan-evens Jul 30, 2025
3c09d52
update to main for firestarr-cpp
jordan-evens Apr 27, 2026
cc15c7c
fix link for bounds generation input
jordan-evens Apr 28, 2026
13ba31f
warn and continue if scan_queue() doesn't work
jordan-evens Apr 28, 2026
97274f3
change to use numpy 2 and add pytz to requirements.txt
jordan-evens Apr 28, 2026
87398e6
use containers built by submodule and rejig firestarr-app containers …
jordan-evens Apr 28, 2026
752d518
add setup.sh
jordan-evens Apr 28, 2026
7dc9a70
fix download and extract rasters
jordan-evens Apr 28, 2026
e9b5b3f
fix call for make_bounds
jordan-evens Apr 28, 2026
42a1770
add workaround for unzipping when python doesn't work but 7zip does
jordan-evens Apr 28, 2026
8924a57
return None when no area to calculate
jordan-evens Apr 28, 2026
9020617
remove PC shape before join
jordan-evens Apr 28, 2026
d1782f8
fix assigning date when empty
jordan-evens Apr 28, 2026
ae13ba9
don't try file for hotspots first
jordan-evens Apr 28, 2026
6645a2b
fix error when queue not configured
jordan-evens Apr 28, 2026
22df077
deal with empty dataframe
jordan-evens Apr 28, 2026
dfa3af1
check instead of handling error so debugger doesn't stop
jordan-evens Apr 28, 2026
40b1fc0
replace RASTER_ROOT with absolute path during setup.sh
jordan-evens Apr 28, 2026
8c326aa
add --tz argument required for firestarr now
jordan-evens Apr 28, 2026
582409d
avoid error with empty dataframe
jordan-evens Apr 28, 2026
17265fe
fix typo in error message
jordan-evens Apr 28, 2026
9b1c800
turn off ON agency data sources since not working right now
jordan-evens Apr 28, 2026
56fb2b8
add command to run at end of setup.sh
jordan-evens Apr 28, 2026
db01298
add submodule init
jordan-evens Apr 28, 2026
1786100
change settings so that simulations are run much quicker for this test
jordan-evens Apr 28, 2026
f80c947
fix typo
jordan-evens Apr 28, 2026
8b2991e
add firestarr-app-hotfix temporarily to patch azure without updating …
jordan-evens Apr 28, 2026
15bd05b
#13 column fix crash from numpy 2 upgrade
infantej2 May 5, 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
176 changes: 56 additions & 120 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,67 +1,9 @@
FROM debian:bookworm-slim AS minimal-with-user
ARG USERNAME
ARG USER_ID
FROM debian:trixie-slim AS minimal-with-libs
ENV TMPDIR=/tmp
RUN apt-get update --fix-missing \
&& apt-get install -y locales \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen \
&& apt-get install -y sudo \
&& groupadd --gid ${USER_ID} ${USERNAME} \
&& useradd --uid ${USER_ID} --gid ${USER_ID} -m ${USERNAME} \
&& chsh --shell /bin/bash ${USERNAME} \
&& echo ${USERNAME} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USERNAME} \
&& chmod 0440 /etc/sudoers.d/${USERNAME} \
&& mkdir -p /appl/firestarr \
&& chown -R ${USERNAME}:${USERNAME} /appl


FROM minimal-with-user AS minimal-with-libs
RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends \
libgeotiff5


FROM minimal-with-libs AS gcc-cmake-with-libs
RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends \
libtiff-dev libgeotiff-dev \
cmake gcc g++ make


FROM gcc-cmake-with-libs AS firestarr-build
ARG USERNAME
ARG VERSION
ENV VERSION=${VERSION}
WORKDIR /appl/firestarr
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/src/cpp src/cpp/
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/CMakeLists.txt .
USER ${USERNAME}
RUN cmake -S . -B /appl/firestarr/build -D CMAKE_BUILD_TYPE=Release \
&& cmake --build /appl/firestarr/build --config Release --target all -j $(nproc)


FROM minimal-with-libs AS firestarr-base-env
ARG USERNAME
ARG VERSION
ENV VERSION=${VERSION}
USER root
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# make a layer that's the environment for firestarr with scratch to clear out old layers
FROM scratch AS firestarr-base
COPY --from=firestarr-base-env / /

# derive final image from base so updates to binary are small layers
FROM firestarr-base AS firestarr
ARG USERNAME
USER ${USERNAME}
WORKDIR /appl/firestarr
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/fuel.lut /appl/firestarr/
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/settings.ini /appl/firestarr/
COPY --chown=${USERNAME}:${USERNAME} --from=firestarr-build /appl/firestarr/firestarr /appl/firestarr/
USER ${USERNAME}
RUN echo cd /appl/firestarr >> /home/${USERNAME}/.bashrc
RUN mkdir -p /appl/firestarr


# saves more work to reuse python than it does to reuse gcc
Expand All @@ -76,7 +18,6 @@ RUN apt-get update --fix-missing \
python3 gdal-bin python3-gdal python3-setuptools python3-pip python3-venv \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \
&& python -c "from osgeo import gdal"
USER ${USERNAME}
WORKDIR /appl/firestarr/
# if we make venv with with user then permissions should be correct
# HACK: make sure python folder doesn't break if version changes
Expand All @@ -85,16 +26,14 @@ RUN python -m venv --system-site-packages /appl/.venv \
&& echo /appl/firestarr/src/py/firestarr > /appl/.venv/lib/`ls -1 /appl/.venv/lib/ | grep python`/site-packages/firestarr.pth \
&& . /appl/.venv/bin/activate \
&& python -c "from osgeo import gdal" \
&& echo source /appl/.venv/bin/activate >> /home/${USERNAME}/.bashrc
&& echo source /appl/.venv/bin/activate >> /root/.bashrc


FROM py-gdal AS firestarr-app-base
ARG USERNAME
WORKDIR /appl/firestarr/
# if we make venv with with user then permissions should be correct
COPY --chown=${USERNAME}:${USERNAME} .docker/requirements.txt /appl/requirements.txt
USER ${USERNAME}
RUN echo cd /appl/firestarr >> /home/${USERNAME}/.bashrc
COPY .docker/requirements.txt /appl/requirements.txt
RUN echo cd /appl/firestarr >> /root/.bashrc
# HACK: make sure osgeo/gdal is available before & after installing requirements
RUN python -c "from osgeo import gdal" \
&& . /appl/.venv/bin/activate \
Expand All @@ -104,93 +43,90 @@ RUN python -c "from osgeo import gdal" \


FROM firestarr-app-base AS firestarr-app-gcc
ARG USERNAME
USER root
RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends \
libtiff-dev libgeotiff-dev \
gdb valgrind libdwarf-dev libelf-dev libdw-dev linux-perf clang-format \
cmake gcc g++ make
USER ${USERNAME}


FROM firestarr-app-gcc AS firestarr-dev
ARG USERNAME
FROM firestarr-app-gcc AS firestarr-app-dev
ARG VERSION
ENV VERSION=${VERSION}
ENV TMPDIR=/tmp
WORKDIR /appl/firestarr/


FROM firestarr-dev AS firestarr-dev-svc
ARG USERNAME
ARG VERSION
ENV VERSION=${VERSION}
ENV TMPDIR=/tmp
# run as root so we can redirect to where docker logs will show progress
COPY .docker/crontab /etc/crontab
USER ${USERNAME}
SHELL ["/bin/bash"]
ENTRYPOINT ["sudo", "cron", "-f"]


FROM firestarr-dev AS firestarr-setup-gis
ARG USERNAME
USER ${USERNAME}
COPY bounds.geojson /appl/firestarr/
RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends \
cmake gcc g++ make ninja-build pkg-config \
curl zip unzip tar ca-certificates git
# vcpkg says: Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm, s390x, ppc64le and riscv platforms.
ENV VCPKG_FORCE_SYSTEM_BINARIES=1
ENV VCPKG_ROOT=/appl/vcpkg
WORKDIR /appl
RUN --mount=type=bind,source=./firestarr/vcpkg-configuration.json,target=./vcpkg-configuration.json \
--mount=type=bind,source=./firestarr/vcpkg.json,target=./vcpkg.json \
git clone -v https://github.com/microsoft/vcpkg.git \
&& cd vcpkg \
&& git checkout $(sed -n '/baseline/{s/.*\"\([^"]*\)",$/\1/g;p}' ../firestarr/vcpkg-configuration.json) \
&& cd .. \
&& vcpkg/bootstrap-vcpkg.sh -disableMetrics \
&& cd firestarr \
&& ../vcpkg/vcpkg install
# RUN --mount=type=bind,source=./firestarr/cmake,target=./cmake \
# --mount=type=bind,source=./firestarr/CMakeLists.txt,target=./CMakeLists.txt \
# --mount=type=bind,source=./firestarr/CMakePresets.json,target=./CMakePresets.json \
# --mount=type=bind,source=./firestarr/.clang-format,target=./.clang-format \
# --mount=type=bind,source=./firestarr/.clang-tidy,target=./.clang-tidy \
# --mount=type=bind,source=./firestarr/.env,target=./.env \
# --mount=type=bind,source=./firestarr/src/cpp,target=./src/cpp \
# --mount=type=bind,source=./firestarr/test/data,target=./test/data \
# --mount=type=bind,source=./firestarr/test/input,target=./test/input \
# --mount=type=bind,source=./firestarr/fuel.lut,target=./fuel.lut \
# --mount=type=bind,source=./firestarr/settings.ini,target=./settings.ini \
# cmake --preset Release \
# && cmake --build --parallel --preset Release \
# && ctest --preset Release



FROM firestarr-app-dev AS firestarr-setup-gis
ENV TMPDIR=/tmp
WORKDIR /appl/gis/
RUN echo cd /appl/gis >> /home/${USERNAME}/.bashrc
SHELL ["/bin/bash"]
ENTRYPOINT ["tail", "-f", "/dev/null"]
RUN echo cd /appl/gis >> /root/.bashrc


FROM firestarr-app-base AS firestarr-prod-base-env
ARG USERNAME
USER root
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
USER ${USERNAME}
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /home/user/.cache
RUN find -type d -name __pycache__ / | xargs -tI {} rm -rf {}

FROM scratch AS firestarr-prod-base
COPY --from=firestarr-prod-base-env / /

# derive final image from base so updates to binary are small layers
FROM firestarr-prod-base AS firestarr-prod
ARG USERNAME
ARG VERSION
ENV VERSION=${VERSION}
ENV TMPDIR=/tmp
WORKDIR /appl/firestarr
COPY --chown=${USERNAME}:${USERNAME} ./config /appl/
COPY --chown=${USERNAME}:${USERNAME} --from=firestarr-build /appl/firestarr/firestarr .
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/bounds.geojson /appl/firestarr/
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/fuel.lut /appl/firestarr/
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/settings.ini /appl/firestarr/
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/scripts /appl/firestarr/scripts/
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/src/py/firestarr /appl/firestarr/src/py/firestarr/
COPY ./config /appl/
COPY --from=firestarr-build /appl/firestarr/firestarr .
COPY ./bounds.geojson /appl/
COPY ./firestarr/fuel.lut /appl/firestarr/
COPY ./firestarr/settings.ini /appl/firestarr/
COPY ./scripts/ /appl/firestarr/scripts/
COPY ./src/py/firestarr/ /appl/firestarr/src/py/firestarr/
WORKDIR /appl/firestarr/src/py/cffdrs-ng
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/src/py/cffdrs-ng/NG_FWI.py .
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/src/py/cffdrs-ng/old_cffdrs.py .
COPY --chown=${USERNAME}:${USERNAME} ./firestarr/src/py/cffdrs-ng/util.py .
USER ${USERNAME}
COPY ./src/py/cffdrs-ng/NG_FWI.py .
COPY ./src/py/cffdrs-ng/old_cffdrs.py .
COPY ./src/py/cffdrs-ng/util.py .

# doesn't delete intermediaries, but maybe smaller between versions?
FROM firestarr-prod AS firestarr-app
ARG USERNAME
ARG VERSION
ENV VERSION=${VERSION}
ENV TMPDIR=/tmp
USER ${USERNAME}
WORKDIR /appl/firestarr
ENTRYPOINT [ "/appl/firestarr/scripts/publish_after.sh" ]

FROM firestarr-app AS firestarr-app-svc
ARG USERNAME
ARG VERSION
ENV VERSION=${VERSION}
ENV TMPDIR=/tmp
# run as root so we can redirect to where docker logs will show progress
COPY .docker/crontab /etc/crontab
RUN sed -i 's/CRONJOB_RUN=.*/CRONJOB_RUN=1/g' /appl/config
WORKDIR /appl/firestarr
USER ${USERNAME}
ENTRYPOINT ["sudo", "cron", "-f"]
11 changes: 0 additions & 11 deletions .docker/crontab

This file was deleted.

3 changes: 2 additions & 1 deletion .docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ fiona
geopandas
ipython
multiprocess
numpy<2
numpy
pandas
psutil
pyarrow
pycrs
pyogrio
pyrate-limiter==2.10.0
pytz
rasterio
requests
scipy
Expand Down
9 changes: 6 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
!.docker/requirements*.txt
!.docker/crontab
!gis
!firestarr/src
!**/src
!firestarr/CMakeLists.txt
!firestarr/fuel.lut
!firestarr/bounds.geojson
!firestarr/scripts/*.sh
!bounds.geojson
!**/scripts/*.sh
!firestarr/settings.ini
!firestarr/vcpkg*
!./config

**/src/py/**/*.sh
**/src/**/.git*
**/__pycache__
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION=0.9.5.4
VERSION=0.9.6
USERNAME=user
USER_ID=1000
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
**/dist
**/logs
**/private
**/sims
**/output*
**/.venv
**/src/cpp/version.cpp
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[submodule "cffdrs-ng"]
path = firestarr/src/py/cffdrs-ng
path = src/py/cffdrs-ng
url = https://github.com/jordan-evens/cffdrs-ng.git
branch = main
[submodule "firestarr"]
path = firestarr
url = git@github.com:CWFMF/firestarr-cpp.git
5 changes: 5 additions & 0 deletions Dockerfile_hotfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM registrycwfisdev.azurecr.io/firestarr/firestarr-app:latest AS firestarr-app-hotfix
ENV VERSION=0.9.6
WORKDIR /appl/firestarr
COPY ./src/py/firestarr/ /appl/firestarr/src/py/firestarr/
RUN echo "This is a patch of v0.9.5.5 to fix errors with empty dataframes but not upgrade numpy or anything else" > /appl/firestarr/NOTE.md
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
This is used to create containers for collecting & processing inputs/outputs of
FireSTARR. The current workflow is to either run the containers locally or in Azure,
and (optionally) publish the results to a geoserver WMS.

For performance reasons, the version of FireSTARR used right now is stripped down to just
the code required to create the burn probability maps that are published, and it does
not contain many of the options from the version at https://github.com/CWFMF/FireSTARR/tree/575f6c064b12eae8716a221d25343398073f0c97z.

Eventually things will be re-implemented in the submodule repo at
https://github.com/cwmfmf/firestarr-cpp.

# About FireSTARR

## Overview
Expand Down
File renamed without changes.
Loading