In the legacy version of eos-template, the Docker build workflow built a model image first with the optimized multistage + conda-pack approach (ie V2), failing which, it was built with the legacy bentoml (ie V1) approach.
The current eos-template assumes that the model running that workflow follows the new template structure built by Ersilia-Pack. However, this is not the case and it creates a problem, because now we cannot directly update workflows from this template repositories into the model repositories. Additionally, Ersilia Pack was developed with backwards compatibility in mind to be able to rebuild model images with it, failing which we default to the previous approach.
To solve this, we will employ the following logic:
If in a model repository, the new repository structure exists, ie the presence of install.yml file, then we will only run the ersilia-pack build.
If this is not the case, then we will first run ersilia pack build and test it, and if it fails, we will build V2 and V1 as was previously being done.
This means, that if a model repository does not follow the new template, we always attempt docker builds in the following sequence, stopping when a build succeeds: ersilia pack --> multi stage + condapack --> legacy bentoml.
This also implies that we only need conditions placed on the "multi stage + condapack", and "legacy bentoml" steps.
In the legacy version of eos-template, the Docker build workflow built a model image first with the optimized multistage + conda-pack approach (ie V2), failing which, it was built with the legacy bentoml (ie V1) approach.
The current eos-template assumes that the model running that workflow follows the new template structure built by Ersilia-Pack. However, this is not the case and it creates a problem, because now we cannot directly update workflows from this template repositories into the model repositories. Additionally, Ersilia Pack was developed with backwards compatibility in mind to be able to rebuild model images with it, failing which we default to the previous approach.
To solve this, we will employ the following logic:
install.yml
file, then we will only run the ersilia-pack build.