|
| 1 | +name: Build & Push nccl-test Container Image (Dev) |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - feature/nccl-with-sharp |
| 7 | + paths: |
| 8 | + - infrastructure_validations/aks/NCCL/docker/Dockerfile |
| 9 | + - .github/workflows/build_nccl_image_dev.yaml |
| 10 | + |
| 11 | + workflow_dispatch: # Allow manual triggering |
| 12 | + |
| 13 | +jobs: |
| 14 | + build_push_dev: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + timeout-minutes: 120 |
| 17 | + permissions: |
| 18 | + contents: read |
| 19 | + packages: write |
| 20 | + |
| 21 | + steps: |
| 22 | + - name: Maximize build space |
| 23 | + uses: AdityaGarg8/remove-unwanted-software@v5 |
| 24 | + with: |
| 25 | + remove-dotnet: 'true' |
| 26 | + remove-android: 'true' |
| 27 | + remove-haskell: 'true' |
| 28 | + remove-codeql: 'true' |
| 29 | + remove-docker-images: 'true' |
| 30 | + |
| 31 | + - name: Checkout code |
| 32 | + uses: actions/checkout@v4 |
| 33 | + |
| 34 | + - name: Set up Docker Buildx |
| 35 | + uses: docker/setup-buildx-action@v3 |
| 36 | + |
| 37 | + - name: Login to GHCR |
| 38 | + uses: docker/login-action@v3 |
| 39 | + with: |
| 40 | + registry: ghcr.io |
| 41 | + username: ${{ github.actor}} |
| 42 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 43 | + |
| 44 | + - name: Generate tags |
| 45 | + id: tag |
| 46 | + uses: docker/metadata-action@v5 |
| 47 | + with: |
| 48 | + images: ghcr.io/azure/ai-infrastructure-on-azure/nccl-test |
| 49 | + tags: | |
| 50 | + type=raw,value=dev |
| 51 | + type=raw,value=dev-{{sha}} |
| 52 | + type=raw,value=dev-pytorch-{{date 'YYYYMMDD-hhmmss' tz='UTC'}} |
| 53 | +
|
| 54 | + - name: Build and push Dev Image |
| 55 | + uses: docker/build-push-action@v6 |
| 56 | + with: |
| 57 | + context: infrastructure_validations/aks/NCCL/docker |
| 58 | + file: infrastructure_validations/aks/NCCL/docker/Dockerfile |
| 59 | + push: true |
| 60 | + tags: ${{ steps.tag.outputs.tags }} |
| 61 | + labels: ${{ steps.tag.outputs.labels }} |
| 62 | + cache-from: type=gha |
| 63 | + cache-to: type=gha,mode=max |
| 64 | + |
| 65 | + - name: Image Summary |
| 66 | + run: | |
| 67 | + echo "## Dev NCCL Test Image Built Successfully! 🚀" >> $GITHUB_STEP_SUMMARY |
| 68 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 69 | + echo "**Image Tags:**" >> $GITHUB_STEP_SUMMARY |
| 70 | + echo "- \`ghcr.io/azure/ai-infrastructure-on-azure/nccl-test:dev\`" >> $GITHUB_STEP_SUMMARY |
| 71 | + echo "- \`ghcr.io/azure/ai-infrastructure-on-azure/nccl-test:dev-${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY |
| 72 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 73 | + echo "**Changes:**" >> $GITHUB_STEP_SUMMARY |
| 74 | + echo "- Updated to use PyTorch base image: \`nvcr.io/nvidia/pytorch:25.06-py3\`" >> $GITHUB_STEP_SUMMARY |
| 75 | + echo "- Includes NCCL tests for distributed training validation" >> $GITHUB_STEP_SUMMARY |
| 76 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 77 | + echo "**Usage:**" >> $GITHUB_STEP_SUMMARY |
| 78 | + echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY |
| 79 | + echo "docker pull ghcr.io/azure/ai-infrastructure-on-azure/nccl-test:dev" >> $GITHUB_STEP_SUMMARY |
| 80 | + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY |
0 commit comments