FireDynamics / propti

PROPTI is an interface tool that couples simulation models with algorithms to solve the inverse problem of material parameter estimation in a modular way. It is designed with flexibility in mind and can communicate with arbitrary algorithm libraries and simulation models. Furthermore, it provides basic means of pre- and post-processing.
MIT License
15 stars 124 forks source link

Docker improvements #113

Closed rweisse closed 1 month ago

rweisse commented 2 months ago

Hello everyone, @TristanHehnen and @lu-kas!

A while ago I told you about my idea to revise the Docker image in this repository.

Changes

  1. I have added so-called shebangs to the main python files (#!/usr/bin/env python3). This allows the files to be executed directly in unix based systems without a preceding python command.
  2. I have modified the Dockerfile so that it extends the FDS Docker image provided by openbcl/fds-dockerfiles. In addition, an argument with the required FDS version can be passed when building the image. In this way, a Propti Docker image can be created very easily for different FDS versions. You will find the relevant instructions in the corresponding readme.md file. I have also created a nightly version of the Dockerfile. This can be used to run Propti in combination with an FDS Test Bundle. This allows Propti to be tested with new and unreleased FDS features.
  3. I have created four workflows so that the Propti Docker images can be provided fully automatically through this repository in future.

Workflow Details

Deploy Propti: .github/workflows/deploy.yaml

After merging this Pull request this workflow can be triggered manually by the repository owner using the Actions tab by specifying an FDS version number (at least 6.7.4). This action will build and push Propti to the packages section of this repository as a Docker image.

Furthermore, this workflow can be triggered by openbcl/fds-dockerfiles as soon as a new FDS version is published there. This would allow the Docker images for Propti to be generated and kept up to date fully automatically without your intervention. However, a token with read permissions for the Propti repository must be provided to openbcl for this purpose. This is straightforward. However, we should have a phone call about this.

Deploy Propti Nightly: .github/workflows/deploy.nightly.yaml

This workflow has the same functionality as the previous one. However, it builds and pushes a Propti nightly image, which contains the current nightly version of FDS for testing purposes.

Update All Propti Images: .github/workflows/update.yaml

This workflow is triggered fully automatically as soon as files with the .py extension are updated in the master branch of this repository. The same applies to adjustments to the .dockerignore file or the individual Dockerfiles in the docker folder. The workflow reads all previously published versions of Propti images in this repository and ensures that they are rebuilt and pushed again. This ensures that the source code is always kept up to date for all Docker images of Propti. You can therefore continue to develop Propti without having to worry about the Docker images of Propti becoming obsolete.

Update All Propti Nightly Images: .github/workflows/update.nightly.yaml

This workflow has the same functionality as the previous one. However, it rebuilds and pushes all Propti nightly images, which contain nightly versions of FDS for testing purposes.


Kind regards Robert

TristanHehnen commented 2 months ago

Hi Robert,

this sounds good, thank you very much! I'll talk to Lukas about scheduling a call.

Best, Tristan