From 2c217e2cbdffd636af5a23c049c75328fb71819c Mon Sep 17 00:00:00 2001 From: Nick Sarnie Date: Thu, 5 Dec 2024 04:43:23 +0900 Subject: [PATCH] [CI] Use Ubuntu 24.04 for dev-igc and unstable (#16255) dev_igc and unstable need Ubuntu 24.04 now based on the IGC packaging, so move our Dockerfiles and CI to use 24.04 for these. I needed to manually bump the dev-igc version because the artifacts for the current one are expired so they can't be downloaded anymore so we can't make the Docker image. The dev-igc CI run is expected to fail here, it always uses the official intel/llvm Docker images, even if the current PR updates them, so we need to wait for this PR to be merged to test it. I'll watch it once we merge. --------- Signed-off-by: Sarnie, Nick --- .../workflows/sycl-containers-igc-dev.yaml | 6 ++-- .github/workflows/sycl-containers.yaml | 4 +-- .github/workflows/sycl-linux-precommit.yml | 2 +- .../ubuntu2404_intel_drivers.Dockerfile | 29 +++++++++++++++++++ ...untu2404_intel_drivers_igc_dev.Dockerfile} | 2 +- devops/dependencies-igc-dev.json | 8 ++--- devops/scripts/install_drivers.sh | 15 ++++++++-- sycl/doc/developer/DockerBKMs.md | 11 ++++--- 8 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 devops/containers/ubuntu2404_intel_drivers.Dockerfile rename devops/containers/{ubuntu2204_intel_drivers_igc_dev.Dockerfile => ubuntu2404_intel_drivers_igc_dev.Dockerfile} (92%) diff --git a/.github/workflows/sycl-containers-igc-dev.yaml b/.github/workflows/sycl-containers-igc-dev.yaml index 8bf8def9d8148..40809017e8be8 100644 --- a/.github/workflows/sycl-containers-igc-dev.yaml +++ b/.github/workflows/sycl-containers-igc-dev.yaml @@ -26,9 +26,9 @@ jobs: strategy: matrix: include: - - name: Intel Drivers Ubuntu 22.04 Docker image with dev IGC - dockerfile: ubuntu2204_intel_drivers_igc_dev - imagefile: ubuntu2204_intel_drivers + - name: Intel Drivers Ubuntu 24.04 Docker image with dev IGC + dockerfile: ubuntu2404_intel_drivers_igc_dev + imagefile: ubuntu2404_intel_drivers tag: devigc build_args: | "use_latest=false" diff --git a/.github/workflows/sycl-containers.yaml b/.github/workflows/sycl-containers.yaml index f1d18173a7fd4..950388591b8d2 100644 --- a/.github/workflows/sycl-containers.yaml +++ b/.github/workflows/sycl-containers.yaml @@ -51,8 +51,8 @@ jobs: file: ubuntu2204_intel_drivers tag: latest build_args: "use_latest=false" - - name: Intel Drivers (unstable) Ubuntu 22.04 Docker image - file: ubuntu2204_intel_drivers + - name: Intel Drivers (unstable) Ubuntu 24.04 Docker image + file: ubuntu2404_intel_drivers tag: unstable build_args: "use_latest=true" - name: Build + Intel Drivers Ubuntu 22.04 Docker image diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 231d49b0500c5..b9ba02e494f8d 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -103,7 +103,7 @@ jobs: env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' - name: E2E tests with dev igc on Intel Arc A-Series Graphics runner: '["Linux", "arc"]' - image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:devigc + image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN target_devices: level_zero:gpu;opencl:gpu reset_intel_gpu: true diff --git a/devops/containers/ubuntu2404_intel_drivers.Dockerfile b/devops/containers/ubuntu2404_intel_drivers.Dockerfile new file mode 100644 index 0000000000000..b45e4a8adbb51 --- /dev/null +++ b/devops/containers/ubuntu2404_intel_drivers.Dockerfile @@ -0,0 +1,29 @@ +ARG base_tag=latest +ARG base_image=ghcr.io/intel/llvm/ubuntu2404_base + +FROM $base_image:$base_tag + +ENV DEBIAN_FRONTEND=noninteractive + +ARG use_latest=true + +RUN apt update && apt install -yqq wget + +COPY scripts/get_release.py / +COPY scripts/install_drivers.sh / +COPY dependencies.json / + +RUN mkdir /runtimes +ENV INSTALL_LOCATION=/runtimes +RUN --mount=type=secret,id=github_token \ + if [ "$use_latest" = "true" ]; then \ + install_driver_opt=" --use-latest"; \ + else \ + install_driver_opt=" dependencies.json"; \ + fi && \ + GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh $install_driver_opt --all + +COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh + +ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"] + diff --git a/devops/containers/ubuntu2204_intel_drivers_igc_dev.Dockerfile b/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile similarity index 92% rename from devops/containers/ubuntu2204_intel_drivers_igc_dev.Dockerfile rename to devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile index 3a90699e23030..fd40361a379f5 100644 --- a/devops/containers/ubuntu2204_intel_drivers_igc_dev.Dockerfile +++ b/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile @@ -1,5 +1,5 @@ ARG base_tag=latest -ARG base_image=ghcr.io/intel/llvm/ubuntu2204_base +ARG base_image=ghcr.io/intel/llvm/ubuntu2404_base FROM $base_image:$base_tag diff --git a/devops/dependencies-igc-dev.json b/devops/dependencies-igc-dev.json index ef7c0e2db88ad..02d1feab783e2 100644 --- a/devops/dependencies-igc-dev.json +++ b/devops/dependencies-igc-dev.json @@ -1,10 +1,10 @@ { "linux": { "igc_dev": { - "github_tag": "igc-dev-6ee988a", - "version": "6ee988a", - "updated_at": "2024-11-26T15:44:10Z", - "url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/2239640503/zip", + "github_tag": "igc-dev-3db59df", + "version": "3db59df", + "updated_at": "2024-12-03T20:43:00Z", + "url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/2248119261/zip", "root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu" } } diff --git a/devops/scripts/install_drivers.sh b/devops/scripts/install_drivers.sh index 6efbc792d9ffc..9607051d4f861 100755 --- a/devops/scripts/install_drivers.sh +++ b/devops/scripts/install_drivers.sh @@ -119,6 +119,11 @@ InstallIGFX () { # This can help us avoid using the risky force-depends-version option in dpkg command. # # Of course, this also installed the libopencl-clang so that we can copy and use later as a temporariy workaround. + IS_IGC_DEV=$(CheckIGCdevTag $IGCTAG) + UBUNTU_VER="u22\.04" + if [ "$IS_IGC_DEV" == "Yes" ] || [ "$L0_TAG" == "latest" ]; then + UBUNTU_VER="u24\.04" + fi get_release intel/intel-graphics-compiler $IGC_TAG \ | grep ".*deb" \ | wget -qi - @@ -126,16 +131,20 @@ InstallIGFX () { | grep -E ".*((deb)|(sum))" \ | wget -qi - # Perform the checksum conditionally and then get the release - sha256sum -c *.sum && \ + # Skip the ww45 checksum because the igc_dev driver was manually updated + # so the package versions don't exactly match. + if [ ! -f "ww45.sum" ]; then + sha256sum -c *.sum + fi get_release intel/cm-compiler $CM_TAG \ | grep ".*deb" \ | grep -v "u18" \ | wget -qi - get_release oneapi-src/level-zero $L0_TAG \ - | grep ".*u22\.04.*deb" \ + | grep ".*$UBUNTU_VER.*deb" \ | wget -qi - dpkg -i *.deb && rm *.deb *.sum - IS_IGC_DEV=$(CheckIGCdevTag $IGCTAG) + mkdir -p /usr/local/lib/igc/ echo "$IGC_TAG" > /usr/local/lib/igc/IGCTAG.txt if [ "$IS_IGC_DEV" == "Yes" ]; then # Dev IGC deb package did not include libopencl-clang diff --git a/sycl/doc/developer/DockerBKMs.md b/sycl/doc/developer/DockerBKMs.md index d407859a39872..f03254a5fb6db 100644 --- a/sycl/doc/developer/DockerBKMs.md +++ b/sycl/doc/developer/DockerBKMs.md @@ -41,17 +41,20 @@ The following containers are publicly available for DPC++ compiler development: - `ghcr.io/intel/llvm/ubuntu2404_base`: contains basic Ubuntu 24.04 environment setup for building DPC++ compiler from source. - `ghcr.io/intel/llvm/ubuntu2204_intel_drivers`: contains everything from the - base container + pre-installed Intel drivers. - The image comes in four flavors/tags: + Ubuntu 22.04 base container + pre-installed Intel drivers. + The image comes in two flavors/tags: * `latest`: Intel drivers are downloaded from release/tag and saved in dependencies.json. The drivers are tested/validated everytime we upgrade the driver. + * `alldeps`: Includes the same Intel drivers as `latest`, as well as the + development kits for NVidia/AMD from the `ubuntu2204_build` container. +- `ghcr.io/intel/llvm/ubuntu2404_intel_drivers`: contains everything from the + Ubuntu 24.04 base container + pre-installed Intel drivers. + The image comes in two flavors/tags: * `devigc`: Intel Graphics Compiler driver from github actions artifacts, other drivers are downloaded from release/tag and saved in dependencies.json. * `unstable`: Intel drivers are downloaded from release/latest. The drivers are installed as it is, not tested or validated. - * `alldeps`: Includes the same Intel drivers as `latest`, as well as the - development kits for NVidia/AMD from the `ubuntu2204_build` container. - `ghcr.io/intel/llvm/ubuntu2204_build`: has development kits installed for NVidia/AMD and can be used for building DPC++ compiler from source with all backends enabled or for end-to-end testing with HIP/CUDA on machines with