FLARE-forecast / FLARE-containers

Docker containers to run FLARE forecast
0 stars 2 forks source link

Limited-time containers #26

Open vahid-dan opened 3 years ago

vahid-dan commented 3 years ago

Enable containers to run for a limited time, save their output before the deadline, and resume their task on the next run.

vahid-dan commented 3 years ago

We need this feature especially for flare-download-noaa container in OpenWhisk mode that regularly takes a long time to finish but we have 10-minute limits for containers on IBM Cloud Functions. We need to have an extra configuration key time-limit in the flare-config.yml. the value would be for instance 10 which is the time limit in minutes. We also need another key wrap-up-time which is the time needed to wrap up the container before exiting. The overall time we have for the process would be equal to time-limit - wrap-up-time. The container should have a timer to check if it is reached this time and when it is there, it should stop the process and pushes the output to the storage, and stops the container at the end. If the job is not fully done, we should be able to run the container, again and again, to pick up what we left off and ultimately finish the job.