From c8afc6612536ceabbbf4b90160ba8848a01dbce8 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 3 Dec 2024 10:19:21 -0800 Subject: [PATCH 1/2] [CI] Add Ubuntu 24.04 base image Signed-off-by: Sarnie, Nick --- .github/workflows/sycl-containers.yaml | 4 +++ devops/containers/ubuntu2404_base.Dockerfile | 32 ++++++++++++++++++++ devops/scripts/install_build_tools.sh | 4 +-- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 devops/containers/ubuntu2404_base.Dockerfile diff --git a/.github/workflows/sycl-containers.yaml b/.github/workflows/sycl-containers.yaml index 7abeee17df01b..f1d18173a7fd4 100644 --- a/.github/workflows/sycl-containers.yaml +++ b/.github/workflows/sycl-containers.yaml @@ -39,6 +39,10 @@ jobs: file: ubuntu2204_base tag: latest build_args: "" + - name: Base Ubuntu 24.04 Docker image + file: ubuntu2404_base + tag: latest + build_args: "" - name: Build Ubuntu Docker image file: ubuntu2204_build tag: latest diff --git a/devops/containers/ubuntu2404_base.Dockerfile b/devops/containers/ubuntu2404_base.Dockerfile new file mode 100644 index 0000000000000..c30e562c630e8 --- /dev/null +++ b/devops/containers/ubuntu2404_base.Dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:24.04 + +ENV DEBIAN_FRONTEND=noninteractive + +USER root + +# Install SYCL prerequisites +COPY scripts/install_build_tools.sh /install.sh +RUN /install.sh + +# By default Ubuntu sets an arbitrary UID value, that is different from host +# system. When CI passes default UID value of 1001, some of LLVM tools fail to +# discover user home directory and fail a few LIT tests. Fixes UID and GID to +# 1001, that is used as default by GitHub Actions. +RUN groupadd -g 1001 sycl && useradd sycl -u 1001 -g 1001 -m -s /bin/bash +# Add sycl user to video/irc groups so that it can access GPU +RUN usermod -aG video sycl +RUN usermod -aG irc sycl + +# group 109 is required for sycl user to access PVC card. +RUN groupadd -g 109 render +RUN usermod -aG render sycl + +# Allow sycl user to run as sudo +RUN echo "sycl ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +COPY actions/cached_checkout /actions/cached_checkout +COPY actions/cleanup /actions/cleanup +COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh +COPY scripts/install_drivers.sh /opt/install_drivers.sh + +ENTRYPOINT ["/docker_entrypoint.sh"] diff --git a/devops/scripts/install_build_tools.sh b/devops/scripts/install_build_tools.sh index 9c4b9d56999de..37d9761751ebb 100755 --- a/devops/scripts/install_build_tools.sh +++ b/devops/scripts/install_build_tools.sh @@ -7,7 +7,7 @@ apt update && apt install -yqq \ ccache \ git \ python3 \ - python3-distutils \ + python3-psutil \ python-is-python3 \ python3-pip \ zstd \ @@ -26,5 +26,3 @@ apt update && apt install -yqq \ libhwloc-dev \ libzstd-dev -pip3 install psutil - From b96b888e9b6e9d2f69894af45d2c713f93e6c88f Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 3 Dec 2024 10:57:30 -0800 Subject: [PATCH 2/2] doc Signed-off-by: Sarnie, Nick --- sycl/doc/developer/DockerBKMs.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sycl/doc/developer/DockerBKMs.md b/sycl/doc/developer/DockerBKMs.md index aac5967dcc284..d407859a39872 100644 --- a/sycl/doc/developer/DockerBKMs.md +++ b/sycl/doc/developer/DockerBKMs.md @@ -36,8 +36,10 @@ identical for Docker and Podman. Choose whatever is available on your system. The following containers are publicly available for DPC++ compiler development: -- `ghcr.io/intel/llvm/ubuntu2204_base`: contains basic environment setup for - building DPC++ compiler from source. +- `ghcr.io/intel/llvm/ubuntu2204_base`: contains basic Ubuntu 22.04 environment + setup for building DPC++ compiler from source. +- `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: