Skip to content

Commit 43cb8dd

Browse files
committed
testing pytorch container
1 parent 997eb1b commit 43cb8dd

File tree

2 files changed

+83
-4
lines changed

2 files changed

+83
-4
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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

infrastructure_validations/aks/NCCL/docker/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
ARG CUDA_VERSION_MINOR=12.8.1
2-
ARG BASE_IMAGE=nvidia/cuda:${CUDA_VERSION_MINOR}-devel-ubuntu24.04
3-
FROM ${BASE_IMAGE} AS builder
1+
ARG PYTORCH_IMAGE=nvcr.io/nvidia/pytorch:25.06-py3
2+
FROM ${PYTORCH_IMAGE} AS builder
43

54
ENV DEBIAN_FRONTEND=noninteractive
65

@@ -36,7 +35,7 @@ RUN git clone --branch ${NCCL_TESTS_VERSION} --depth 1 https://github.com/NVIDIA
3635
RUN git clone --depth=1 https://github.com/Azure/azhpc-images.git /tmp/azhpc-images
3736

3837
# Final minimal image
39-
FROM nvidia/cuda:${CUDA_VERSION_MINOR}-runtime-ubuntu24.04 AS final
38+
FROM nvcr.io/nvidia/pytorch:25.06-py3 AS final
4039

4140
ENV DEBIAN_FRONTEND=noninteractive
4241

0 commit comments

Comments
 (0)