Files
OpenShell/.github/workflows/e2e-gpu-test.yaml
Evan Lezar 5c98604f0f feat(gpu): honor device IDs in Docker and Podman (#1253)
* feat(gpu): honor device IDs in Docker and Podman

Signed-off-by: Evan Lezar <elezar@nvidia.com>

* test(gpu): add Docker and Podman device selection e2e

Signed-off-by: Evan Lezar <elezar@nvidia.com>

* ci(gpu): run Docker GPU e2e workflow

Signed-off-by: Evan Lezar <elezar@nvidia.com>

---------

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2026-05-11 17:09:37 +02:00

67 lines
2.1 KiB
YAML

name: GPU E2E Test
on:
workflow_call:
inputs:
image-tag:
description: "Image tag to test (typically the commit SHA)"
required: true
type: string
permissions:
contents: read
packages: read
jobs:
e2e-gpu:
name: "E2E Docker GPU (${{ matrix.name }})"
runs-on: ${{ matrix.runner }}
continue-on-error: ${{ matrix.experimental }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- name: linux-arm64
runner: linux-arm64-gpu-l4-latest-1
experimental: false
- name: linux-amd64
runner: linux-amd64-gpu-rtxpro6000-latest-1
experimental: false
- name: wsl-amd64
runner: wsl-amd64-gpu-rtxpro6000-latest-1
experimental: true
container:
image: ghcr.io/nvidia/openshell/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: --privileged
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/runner/_work:/home/runner/_work
env:
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_TAG: ${{ inputs.image-tag }}
OPENSHELL_REGISTRY: ghcr.io/nvidia/openshell
OPENSHELL_REGISTRY_HOST: ghcr.io
OPENSHELL_REGISTRY_NAMESPACE: nvidia/openshell
OPENSHELL_REGISTRY_USERNAME: ${{ github.actor }}
OPENSHELL_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
OPENSHELL_E2E_DOCKER_GPU: "1"
steps:
- uses: actions/checkout@v6
- name: Log in to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
- name: Check Docker GPU prerequisites
run: |
docker info --format '{{json .CDISpecDirs}}'
GPU_PROBE_IMAGE="$(awk '$1 == "FROM" && $3 == "AS" && $4 == "gateway" { print $2; exit }' deploy/docker/Dockerfile.images)"
test -n "${GPU_PROBE_IMAGE}"
docker run --rm --device nvidia.com/gpu=all "${GPU_PROBE_IMAGE}" nvidia-smi -L
- name: Run tests
run: mise run --no-deps --skip-deps e2e:docker:gpu