Repository navigation
chore: update NVIDIA GRID driver to 570.237 (vGPU18.8) (#179) #170
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
| name: Building and Pushing to MCR | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: {} | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| cuda: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - config_key: cuda | |
| image_repo: aks-gpu-cuda | |
| - config_key: cuda_lts | |
| image_repo: aks-gpu-cuda-lts | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Load CUDA config | |
| id: load_config | |
| env: | |
| CONFIG_KEY: ${{ matrix.config_key }} | |
| run: | | |
| cuda_version=$(yq e ".${CONFIG_KEY}.version" driver_config.yml) | |
| if [[ ! "$cuda_version" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then | |
| echo "::error::Refusing unexpected CUDA driver version: $cuda_version" | |
| exit 1 | |
| fi | |
| echo "CUDA_VERSION=$cuda_version" | |
| echo "cuda_version=$cuda_version" >> "$GITHUB_OUTPUT" | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Set up Docker to use containerd | |
| uses: docker/setup-docker-action@v5 | |
| with: | |
| daemon-config: | | |
| { | |
| "debug": true, | |
| "features": { | |
| "containerd-snapshotter": true | |
| } | |
| } | |
| - name: Cache Docker layers | |
| uses: actions/cache@v5 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ matrix.image_repo }}-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx-${{ matrix.image_repo }}- | |
| - name: Generate timestamp | |
| id: timestamp | |
| run: echo "timestamp=$(date +'%Y%m%d%H%M%S')" >> "$GITHUB_OUTPUT" | |
| - uses: paulhatch/semantic-version@v6.0.2 | |
| with: | |
| bump_each_commit: false | |
| version_format: "${{ steps.load_config.outputs.cuda_version }}-${{ steps.timestamp.outputs.timestamp }}" | |
| id: semver | |
| - name: 'Check version' | |
| env: | |
| VERSION: ${{ steps.semver.outputs.version }} | |
| VERSION_TAG: ${{ steps.semver.outputs.version_tag }} | |
| run: | | |
| echo "version is $VERSION" | |
| echo "version is $VERSION_TAG" | |
| - name: 'Azure CLI login' | |
| uses: azure/login@v3 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: 'Build and Push' | |
| env: | |
| DRIVER_VERSION: ${{ steps.load_config.outputs.cuda_version }} | |
| IMAGE_REPO: ${{ matrix.image_repo }} | |
| REGISTRY_SERVER: ${{ secrets.AZURE_REGISTRY_SERVER }} | |
| VERSION: ${{ steps.semver.outputs.version }} | |
| run: | | |
| set -x | |
| echo "tag is: " | |
| echo "$VERSION" | |
| image_ref="${REGISTRY_SERVER}/public/aks/${IMAGE_REPO}:${VERSION}" | |
| docker buildx build --platform linux/arm64/v8,linux/amd64 --build-arg DRIVER_KIND=cuda --build-arg "DRIVER_VERSION=${DRIVER_VERSION}" --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t "$image_ref" . | |
| docker images | |
| az acr login -n "$REGISTRY_SERVER" | |
| docker push "$image_ref" | |
| - name: Move cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache | |
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
| cuda-arm64: | |
| runs-on: ubuntu-24.04-arm # see https://github.com/actions/partner-runner-images?tab=readme-ov-file#available-images | |
| strategy: | |
| matrix: | |
| include: | |
| - config_key: cuda | |
| image_repo: aks-gpu-cuda-arm64 | |
| - config_key: cuda_lts | |
| image_repo: aks-gpu-cuda-lts-arm64 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Load CUDA config | |
| id: load_config | |
| env: | |
| CONFIG_KEY: ${{ matrix.config_key }} | |
| run: | | |
| cuda_version=$(yq e ".${CONFIG_KEY}.version" driver_config.yml) | |
| if [[ ! "$cuda_version" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then | |
| echo "::error::Refusing unexpected CUDA driver version: $cuda_version" | |
| exit 1 | |
| fi | |
| echo "CUDA_VERSION=$cuda_version" | |
| echo "cuda_version=$cuda_version" >> "$GITHUB_OUTPUT" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v5 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ matrix.image_repo }}-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx-${{ matrix.image_repo }}- | |
| - name: Generate timestamp | |
| id: timestamp | |
| run: echo "timestamp=$(date +'%Y%m%d%H%M%S')" >> "$GITHUB_OUTPUT" | |
| - uses: paulhatch/semantic-version@v6.0.2 | |
| with: | |
| bump_each_commit: false | |
| version_format: "${{ steps.load_config.outputs.cuda_version }}-${{ steps.timestamp.outputs.timestamp }}" | |
| id: semver | |
| - name: 'Check version' | |
| env: | |
| VERSION: ${{ steps.semver.outputs.version }} | |
| VERSION_TAG: ${{ steps.semver.outputs.version_tag }} | |
| run: | | |
| echo "version is $VERSION" | |
| echo "version is $VERSION_TAG" | |
| - name: 'Azure CLI login' | |
| uses: azure/login@v3 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: 'Build and Push' | |
| env: | |
| DRIVER_VERSION: ${{ steps.load_config.outputs.cuda_version }} | |
| IMAGE_REPO: ${{ matrix.image_repo }} | |
| REGISTRY_SERVER: ${{ secrets.AZURE_REGISTRY_SERVER }} | |
| VERSION: ${{ steps.semver.outputs.version }} | |
| run: | | |
| set -x | |
| echo "tag is: " | |
| echo "$VERSION" | |
| image_ref="${REGISTRY_SERVER}/public/aks/${IMAGE_REPO}:${VERSION}" | |
| docker buildx build --build-arg DRIVER_KIND=cuda --build-arg "DRIVER_VERSION=${DRIVER_VERSION}" --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t "$image_ref" . | |
| docker images | |
| az acr login -n "$REGISTRY_SERVER" | |
| docker push "$image_ref" | |
| - name: Move cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache | |
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
| grid: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - config_key: grid | |
| image_repo: aks-gpu-grid | |
| - config_key: grid_v20 | |
| image_repo: aks-gpu-grid-v20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Load GRID config | |
| id: load_config | |
| env: | |
| CONFIG_KEY: ${{ matrix.config_key }} | |
| run: | | |
| grid_version=$(yq e ".${CONFIG_KEY}.version" driver_config.yml) | |
| grid_url=$(yq e ".${CONFIG_KEY}.url" driver_config.yml) | |
| if [[ ! "$grid_version" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then | |
| echo "::error::Refusing unexpected GRID driver version: $grid_version" | |
| exit 1 | |
| fi | |
| if [[ ! "$grid_url" =~ ^https://[A-Za-z0-9._~:/?#@%+=-]+$ ]]; then | |
| echo "::error::Refusing unexpected GRID driver URL: $grid_url" | |
| exit 1 | |
| fi | |
| echo "GRID_VERSION=$grid_version" | |
| echo "GRID_URL=$grid_url" | |
| echo "grid_version=$grid_version" >> "$GITHUB_OUTPUT" | |
| echo "grid_url=$grid_url" >> "$GITHUB_OUTPUT" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Generate timestamp | |
| id: timestamp | |
| run: echo "timestamp=$(date +'%Y%m%d%H%M%S')" >> "$GITHUB_OUTPUT" | |
| - uses: paulhatch/semantic-version@v6.0.2 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v5 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ matrix.image_repo }}-${{ steps.load_config.outputs.grid_version }}-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx-${{ matrix.image_repo }}-${{ steps.load_config.outputs.grid_version }} | |
| - uses: paulhatch/semantic-version@v6.0.2 | |
| with: | |
| bump_each_commit: false | |
| version_format: "${{ steps.load_config.outputs.grid_version }}-${{ steps.timestamp.outputs.timestamp }}" | |
| id: semver | |
| - name: 'Check version' | |
| env: | |
| VERSION: ${{ steps.semver.outputs.version }} | |
| VERSION_TAG: ${{ steps.semver.outputs.version_tag }} | |
| run: | | |
| echo "version is $VERSION" | |
| echo "version is $VERSION_TAG" | |
| - name: 'Azure CLI login' | |
| uses: azure/login@v3 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: 'Build and Push' | |
| env: | |
| DRIVER_URL: ${{ steps.load_config.outputs.grid_url }} | |
| DRIVER_VERSION: ${{ steps.load_config.outputs.grid_version }} | |
| IMAGE_REPO: ${{ matrix.image_repo }} | |
| REGISTRY_SERVER: ${{ secrets.AZURE_REGISTRY_SERVER }} | |
| VERSION: ${{ steps.semver.outputs.version }} | |
| run: | | |
| set -x | |
| echo "tag is: " | |
| echo "$VERSION" | |
| image_ref="${REGISTRY_SERVER}/public/aks/${IMAGE_REPO}:${VERSION}" | |
| docker buildx build --build-arg "DRIVER_URL=${DRIVER_URL}" --build-arg DRIVER_KIND=grid --build-arg "DRIVER_VERSION=${DRIVER_VERSION}" --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t "$image_ref" . | |
| docker images | |
| az acr login -n "$REGISTRY_SERVER" | |
| docker push "$image_ref" | |
| - name: Move cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache | |
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache |