-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactoring: reimplement Docker strategy #3162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good: I found only one issue and I added a few notes about some potential improvements. Nothing big anyway 👍
NOTE: I haven't review the CI part as you specified it's still WIP. Let me know when it's in a good state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple more comments on the CI part, but basically ready to go 👍
|
||
- name: Release Haystack images | ||
uses: docker/bake-action@v2 | ||
if: startsWith(github.ref, 'refs/tags/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this line, what is it doing? Are we not building the api-latest
in some cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only build api-latest
during a proper release and not when merging in main
. But now I see a potential problem with bugfix releases, let me think about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok there was indeed a problem with the bugfix releases, now I compare the current version being built with the latest Haystack and only tag if the current one is greater
Co-authored-by: Sara Zan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good! 👍
* setup base images * add cpu flavor * use the same Dockerfile for cpu and gpu * better naming, add docs * add docker workflow * add missing image input * change cwd for bake * also push api images * try conditional tagging for releases * revert testing code * update docker readme * document variable override * use Python 3.10 * allow empty HAYSTACK_EXTRAS * Apply suggestions from code review Co-authored-by: Sara Zan <[email protected]> * remove repo description step, can't make it work so far * add docs to the last step as it's tricky * manage tags for the newest images * tests are passing, checking in the last bit Co-authored-by: Sara Zan <[email protected]>
Related Issues
Related to #1952
Proposed Changes:
This PR contains several improvements to our Docker images and we can group the changes under 2 main topics.
New tagging strategy
Right now we offer different images for different image variants, e.g.
haystack-cpu
,haystack-gpu
. After this PR we'll have one image,deepset/haystack
properly tagged to indicate the version and the variant, e.g.deepset/haystack:gpu-1.9.0
. This will be the new tags layout:cpu
,cpu-1.10.0
cpu-1.10.0
gpu
,gpu-1.9.0
gpu-1.9.0
Note: the new images won't have the
latest
tag by design.New building strategy
We now use
bake
to orchestrate the build, which will be defined in thedocker-bake.hcl
file. See the README for examples about how to use it.The builds leverage multiple stages and we'll distribute the
base
variants of the images which might be useful in the development process.Notes for the reviewer
Currently adding automation, still WIP.The CI is good to go, not sure why the last step of the job is failing I suspect access management issues, worst case I'll wipe it offChecklist