Skip to content

chore(deps): update mcr.microsoft.com/mirror/docker/library/ubuntu docker tag to v26 #587

chore(deps): update mcr.microsoft.com/mirror/docker/library/ubuntu docker tag to v26

chore(deps): update mcr.microsoft.com/mirror/docker/library/ubuntu docker tag to v26 #587

Workflow file for this run

name: CI test build
on:
pull_request:
branches:
- main
workflow_dispatch: {}
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@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
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@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
- name: Set up Docker to use containerd
uses: docker/setup-docker-action@77e84dbf09b47d1e29270283c22f16145aa85ca1 # v5.4.0
with:
daemon-config: |
{
"debug": true,
"features": {
"containerd-snapshotter": true
}
}
- name: Cache Docker layers
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
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@9f72830310d5ed81233b641ee59253644cd8a8fc # 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: '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
- 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@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
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@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
- name: Cache Docker layers
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
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@9f72830310d5ed81233b641ee59253644cd8a8fc # 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: '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
- 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@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
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@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
- name: Cache Docker layers
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
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 }}
- name: Generate timestamp
id: timestamp
run: echo "timestamp=$(date +'%Y%m%d%H%M%S')" >> "$GITHUB_OUTPUT"
- uses: paulhatch/semantic-version@9f72830310d5ed81233b641ee59253644cd8a8fc # 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: '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
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Shellcheck prebake scripts
run: shellcheck -S warning install.sh entrypoint.sh
- name: Install bats
run: |
sudo apt-get update
sudo apt-get install -y bats
- name: Run install.sh unit tests
run: bats test/install.bats