-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #220 This PR adds a github actions workflow that builds our reusable images on every merge to main. This should mitigate some of the issues we're having with outdated fondant versions in the components. Each image is tagged with the associated commit and we move the `dev` tag to always point to the latest images build from main. This is now the default version included in the `fondant_component.yaml` of the reusable components. Just note that your runner might not recognize that the image associated with the `dev` tag has changed, and you might have to force it to pull the latest version. The workflow uses [registry caching](https://docs.docker.com/build/cache/backends/registry/) to cache the docker images, which brings down the build time from [~40m](https://github.com/ml6team/fondant/actions/runs/5398796173) to [~20m](https://github.com/ml6team/fondant/actions/runs/5399309438). I opted for registry caching as local github action caching is limited to 10GB, which would be too limited for the amount and size of images we're building. We can look into some additional improvements to this: - [ ] **Direct the runners to always pull images** This will introduce a small delay, but might be worth it to prevent hard to detect issues because of outdated images. - [ ] **Build fondant from local path** The workflow introduced in this PR still requires changes to be merged to main before they are built into the images. Especially while developing on fondant itself, this might still be lacking in usability, as we'd like to be able to test our local changes. This is possible by passing an additional [`--build-context`](https://docs.docker.com/engine/reference/commandline/buildx_build/#build-context), but we'd have to integrate this into the local runner to really be useful, without impacting the user experience. - [ ] **Cache pip** We can also leverage pip caching on top of / instead of docker caching. This wouldn't add a lot of benefit on top of the current approach, as the time spent on downloading packages and building wheels is negligible compared to the time spent communicating with the registry cache. It could be useful in allowing us to include the fondant dependency in the `requirements.txt` again, which would be a bit more transparent. Then the "Install dependencies" layer would no longer be cached by docker, since we change the fondant version on each build, but the other dependencies would be cached using pip. I believe this would still increase the build time though as the cached packages still need to be installed. To leverage the pip cache across containers, we can use a [cache mount](https://docs.docker.com/build/guide/mounts/#add-a-cache-mount).
- Loading branch information
1 parent
7389212
commit d6b8775
Showing
44 changed files
with
178 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build dev images | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set buildx alias | ||
run: docker buildx install | ||
|
||
- name: Build components | ||
run: ./scripts/build_components.sh --cache -t $GITHUB_SHA -t dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
git+https://github.com/ml6team/fondant@main | ||
gcsfs==2023.4.0 | ||
Pillow==9.4.0 | ||
torch==2.0.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
git+https://github.com/ml6team/fondant@main | ||
albumentations==1.3.0 | ||
opencv-python-headless>=4.5.5.62,<5 | ||
gcsfs==2023.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
components/embedding_based_laion_retrieval/fondant_component.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
git+https://github.com/ml6team/fondant@main | ||
gcsfs==2023.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
git+https://github.com/ml6team/fondant@main | ||
pyarrow>=7.0 | ||
gcsfs==2023.4.00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
git+https://github.com/ml6team/fondant@main | ||
pyarrow>=7.0 | ||
gcsfs==2023.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
git+https://github.com/ml6team/fondant@main | ||
pyarrow>=7.0 | ||
gcsfs==2023.4.00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
git+https://github.com/ml6team/fondant@main | ||
pyarrow>=7.0 | ||
gcsfs==2023.4.0 | ||
Pillow==9.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
git+https://github.com/ml6team/fondant@main | ||
gcsfs==2023.4.0 | ||
Pillow==9.4.0 | ||
torch==2.0.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
git+https://github.com/ml6team/fondant@main | ||
pyarrow>=7.0 | ||
gcsfs==2023.4.0 | ||
imagesize==1.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
huggingface_hub==0.14.1 | ||
git+https://github.com/ml6team/fondant@main | ||
pyarrow>=7.0 | ||
Pillow==9.4.0 | ||
gcsfs==2023.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.