-
Notifications
You must be signed in to change notification settings - Fork 25
Add docker push action #278
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
Open
mawad-amd
wants to merge
17
commits into
main
Choose a base branch
from
muhaawad/docker-images
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b875e32
Add docker push action
mawad-amd 95fd213
Use `IRIS_DOCKERHUB_TOKEN`
mawad-amd 8fc5a98
Trigger on push
mawad-amd 15a596d
Use one job
mawad-amd 4636e5c
Set default hash [skip ci]
mawad-amd 04fbc36
Trigger CI for Docker image build [docker only]
mawad-amd 5af0292
Skip lint workflow for [docker only] commits
mawad-amd 03e85b3
Skip all workflows except docker-build-push for [docker only] commits
mawad-amd a718c64
Apply [docker only] condition to ALL jobs in workflows
mawad-amd 01a59b5
Use underscores in tag naming and container_exec.sh script [docker only]
mawad-amd 95d4c7a
Move ruff to dev dependencies
mawad-amd 39b2892
Make Python site-packages writable for all users [docker only]
mawad-amd a7c695e
Fix site-packages path to /opt/venv [docker only]
mawad-amd bd9f2e4
Remove all workflows except docker-build-push [docker only]
mawad-amd 1e25514
Remove test
mawad-amd 48d525d
Add ROCm 6.4.4 Docker image build [docker only]
mawad-amd 75113f2
Fix ROCm 6.4 Dockerfile - remove incorrect chmod path [docker only]
mawad-amd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,98 @@ | ||
| name: Build and Push Docker Image | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - muhaawad/docker-images | ||
| workflow_dispatch: | ||
| inputs: | ||
| triton_commit: | ||
| description: 'Triton commit SHA to use' | ||
| required: false | ||
| default: 'aafec417bded34db6308f5b3d6023daefae43905' | ||
| type: string | ||
|
|
||
| # This workflow always runs, even with [skip ci] or [ci skip] in commit message | ||
|
|
||
| env: | ||
| DOCKERHUB_USERNAME: muhaawad | ||
mawad-amd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| IMAGE_NAME: iris-dev | ||
|
|
||
| jobs: | ||
| build-test: | ||
| runs-on: [self-hosted, mi3008x] | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| timeout-minutes: 60 | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - dockerfile: ./docker/Dockerfile.rocm6.4 | ||
| base-name: "rocm6.4.4_ubuntu24.04_py3.12_pytorch_release_2.7.1" | ||
| - dockerfile: ./docker/Dockerfile.rocm7.0 | ||
| base-name: "rocm7.0.2_ubuntu24.04_py3.12_pytorch_release_2.8.0" | ||
| - dockerfile: ./docker/Dockerfile.rocm7.1 | ||
| base-name: "rocm7.1_ubuntu24.04_py3.12_pytorch_release_2.8.0" | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set Triton SHA | ||
| id: triton | ||
| run: | | ||
| TRITON_COMMIT="${{ inputs.triton_commit || 'aafec417bded34db6308f5b3d6023daefae43905' }}" | ||
| TRITON_SHORT="${TRITON_COMMIT:0:7}" | ||
| echo "short_sha=${TRITON_SHORT}" >> $GITHUB_OUTPUT | ||
| echo "full_sha=${TRITON_COMMIT}" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Build Docker image | ||
| run: | | ||
| IMAGE_TAG="${{ env.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ matrix.base-name }}_triton_${{ steps.triton.outputs.short_sha }}" | ||
| echo "Building ${IMAGE_TAG}..." | ||
| docker build \ | ||
| -f ${{ matrix.dockerfile }} \ | ||
| -t ${IMAGE_TAG} \ | ||
| --build-arg TRITON_COMMIT=${{ steps.triton.outputs.full_sha }} \ | ||
| ./docker | ||
| echo "✅ Build complete!" | ||
|
|
||
| # - name: Run validation tests | ||
| # run: | | ||
| # set -e | ||
| # | ||
| # IMAGE_TAG="${{ env.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ matrix.base-name }}_triton_${{ steps.triton.outputs.short_sha }}" | ||
| # | ||
| # echo "::group::Running validation tests" | ||
| # bash .github/scripts/container_exec.sh --image "${IMAGE_TAG}" " | ||
| # set -e | ||
| # pip install -e . | ||
| # | ||
| # echo '=== Running external validation test ===' | ||
| # wget -O test_iris_distributed.py https://gist.githubusercontent.com/mawad-amd/6375dc078e39e256828f379e03310ec7/raw/a527c3192bee4615292769e340b1c73676f6945a/test_iris_distributed.py | ||
| # python test_iris_distributed.py | ||
| # | ||
| # echo '=== Running external gluon validation test ===' | ||
| # wget -O test_iris_gluon_distributed.py https://gist.githubusercontent.com/mawad-amd/2666dde8ebe2755eb0c4f2108709fcd5/raw/aa567ef3185c37a80d25bc9724ae9589548261b4/test_iris_gluon_distributed.py | ||
| # python test_iris_gluon_distributed.py | ||
| # " | ||
| # echo "::endgroup::" | ||
| # | ||
| # echo "✅ All validation tests passed for ${{ matrix.base-name }}!" | ||
|
|
||
| - name: Log in to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ env.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.IRIS_DOCKERHUB_TOKEN }} | ||
|
|
||
| - name: Push Docker image | ||
| run: | | ||
| IMAGE_TAG="${{ env.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ matrix.base-name }}_triton_${{ steps.triton.outputs.short_sha }}" | ||
| echo "Pushing ${IMAGE_TAG} to Docker Hub..." | ||
| docker push ${IMAGE_TAG} | ||
| echo "✅ Successfully pushed ${{ matrix.base-name }}!" | ||
|
|
||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.