Skip to content
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

FIX [CI / Docker] Follow up from #1481 #1487

Merged
merged 36 commits into from
Mar 5, 2024
Merged

Conversation

younesbelkada
Copy link
Contributor

As per title, this PR provides some fixes so that #1481 works as intended

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@younesbelkada
Copy link
Contributor Author

Here is a link of a job that was successful after modifying two dockerfiles to use python 3.10 instead of python 3.8: https://github.com/huggingface/peft/actions/runs/7969411897/job/21755184945

Copy link
Contributor

@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @younesbelkada!

.github/workflows/test-docker-build.yml Outdated Show resolved Hide resolved
Co-authored-by: Guillaume LEGENDRE <glegendre01@gmail.com>
Copy link

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! A few nits and one question regarding security (despite @glegendre01 already approved)


get_changed_files:
name: "Build all modified docker images"
runs-on: ubuntu-latest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use [intel-cpu, 8-cpu, ci] to avoid any potential disk full issue

Comment on lines +42 to +51
- name: Cleanup disk
run: |
sudo ls -l /usr/local/lib/
sudo ls -l /usr/share/
sudo du -sh /usr/local/lib/
sudo du -sh /usr/share/
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo du -sh /usr/local/lib/
sudo du -sh /usr/share/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need this once using [intel-cpu, 8-cpu, ci]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if peft have access to those :/

Comment on lines +52 to +57
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Check out code
uses: actions/checkout@v3
- name: Build Docker image
uses: docker/build-push-action@v4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having one empty line between each step would be nice to eyes 👀

uses: docker/build-push-action@v4
with:
file: ${{ matrix.docker-file }}
context: .
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not so familiar, but probably we don't need context here if file is specified

@@ -1,42 +1,61 @@
name: Test Docker images (scheduled)
name: Test Docker images (on PR)

on:
pull_request:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we really want to test this in each PR (all of its commits), or just when merged into main.

I know it's better to keep PR green. But for workflow run on each PR, we have to manually approve the run (for security run), right?

ping @glegendre01 again to see if the infra team prefers not to allow rununing on PRs whenever possible, or it doesn't really matter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think as long as we don't push the docker image on docker hub it's all good, from the conversation I had with guillaume !

@younesbelkada younesbelkada merged commit 84abf5a into main Mar 5, 2024
14 checks passed
@younesbelkada younesbelkada deleted the younesbelkada-patch-4 branch March 5, 2024 02:32
BenjaminBossan pushed a commit to BenjaminBossan/peft that referenced this pull request Mar 14, 2024
* Update test-docker-build.yml

* Update test-docker-build.yml

* Update Dockerfile

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update Dockerfile

* Update .github/workflows/test-docker-build.yml

* Update .github/workflows/test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update .github/workflows/test-docker-build.yml

* Update Dockerfile

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* Update test-docker-build.yml

* revert

* Update .github/workflows/test-docker-build.yml

Co-authored-by: Guillaume LEGENDRE <glegendre01@gmail.com>

---------

Co-authored-by: Guillaume LEGENDRE <glegendre01@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants