Improve pipelines by using custom Docker images
The current pipeline of BOB, and therefore BEAT, follows this schema:
- Grab the bootstrap script
- Bootstrap miniconda (which might be downloading the installer script)
- Setup some configuration
- Do some checks
- Do a cleanup
So every build starts from scratch, installs Miniconda, which version is hard coded in bootstrap.py
, then downloads a bunch of dependencies, do the actual work, rinse and repeat for each and every package. Even if there is some caching involved it is still pretty inefficient in terms of bandwidth, power and time consumption.
The script is more or less optimized for shell runner usage however, all these runners can run Docker and actually do use the Docker runner for the Linux build stage.
Since BOB pins its dependencies pretty strictly, it would make sense to create a Docker image with the environment preinstalled. That would reduce that repetitive bdt environment setup happening for every job.
What I would suggest is to do that in steps:
- Create a bdt Docker image based on the image used for the Linux build jobs
- Use that image for Linux specific and deploy job
- Cache the conda related downloads
- Check if it would make sense to preinstall in the Docker image all the bob pinned dependencies
- Check if the Docker-OSX project is something that could be used on the macOS runners so that we don't need a shell runner anymore
- If above's answer is yes, create a macOS bdt image keeping in mind point 4
- Use Docker for all stages
For point 4, even if we have a local mirror for conda, does it really make sense to re-download everything every time ?