diff --git a/devops/containers/ubuntu2204_build.Dockerfile b/devops/containers/ubuntu2204_build.Dockerfile index faeb86126574a..0cdc0bba443cd 100644 --- a/devops/containers/ubuntu2204_build.Dockerfile +++ b/devops/containers/ubuntu2204_build.Dockerfile @@ -39,6 +39,9 @@ RUN groupadd -g 1001 sycl && useradd sycl -u 1001 -g 1001 -m -s /bin/bash RUN usermod -aG video sycl RUN usermod -aG irc sycl +# Allow sycl user to run as sudo +RUN echo "sycl ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh USER sycl diff --git a/devops/containers/ubuntu2204_intel_drivers.Dockerfile b/devops/containers/ubuntu2204_intel_drivers.Dockerfile index fa3745141b827..859f3caf81ccd 100644 --- a/devops/containers/ubuntu2204_intel_drivers.Dockerfile +++ b/devops/containers/ubuntu2204_intel_drivers.Dockerfile @@ -7,13 +7,13 @@ ENV DEBIAN_FRONTEND=noninteractive ARG use_latest=true -RUN apt update && apt install -yqq wget +RUN sudo apt update && sudo apt install -yqq wget COPY scripts/get_release.py / COPY scripts/install_drivers.sh / COPY dependencies.json / -RUN mkdir /runtimes +RUN sudo mkdir /runtimes ENV INSTALL_LOCATION=/runtimes RUN --mount=type=secret,id=github_token \ if [ "$use_latest" = "true" ]; then \ @@ -21,7 +21,7 @@ RUN --mount=type=secret,id=github_token \ else \ install_driver_opt=" dependencies.json"; \ fi && \ - GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh $install_driver_opt --all + GITHUB_TOKEN=$(cat /run/secrets/github_token) sudo /install_drivers.sh $install_driver_opt --all COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh diff --git a/devops/containers/ubuntu2204_preinstalled.Dockerfile b/devops/containers/ubuntu2204_preinstalled.Dockerfile index 60fb91226398e..8d0d13a3ed190 100644 --- a/devops/containers/ubuntu2204_preinstalled.Dockerfile +++ b/devops/containers/ubuntu2204_preinstalled.Dockerfile @@ -10,15 +10,6 @@ ADD sycl_linux.tar.gz /opt/sycl/ ENV PATH /opt/sycl/bin:$PATH ENV LD_LIBRARY_PATH /opt/sycl/lib:$LD_LIBRARY_PATH -# 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 - USER sycl ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"] diff --git a/devops/containers/ubuntu2404_intel_drivers.Dockerfile b/devops/containers/ubuntu2404_intel_drivers.Dockerfile index a3f68a449ec54..e4875c10cbdd3 100644 --- a/devops/containers/ubuntu2404_intel_drivers.Dockerfile +++ b/devops/containers/ubuntu2404_intel_drivers.Dockerfile @@ -7,13 +7,13 @@ ENV DEBIAN_FRONTEND=noninteractive ARG use_latest=true -RUN apt update && apt install -yqq wget +RUN sudo apt update && sudo apt install -yqq wget COPY scripts/get_release.py / COPY scripts/install_drivers.sh / COPY dependencies.json / -RUN mkdir /runtimes +RUN sudo mkdir /runtimes ENV INSTALL_LOCATION=/runtimes RUN --mount=type=secret,id=github_token \ if [ "$use_latest" = "true" ]; then \ @@ -21,7 +21,7 @@ RUN --mount=type=secret,id=github_token \ else \ install_driver_opt=" dependencies.json"; \ fi && \ - GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh $install_driver_opt --all + GITHUB_TOKEN=$(cat /run/secrets/github_token) sudo /install_drivers.sh $install_driver_opt --all COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh diff --git a/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile b/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile index bd73fdde26bec..c7dddf467e95a 100644 --- a/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile +++ b/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile @@ -5,7 +5,7 @@ FROM $base_image:$base_tag ENV DEBIAN_FRONTEND=noninteractive -RUN apt update && apt install -yqq libllvm14 +RUN sudo apt update && sudo apt install -yqq libllvm14 COPY scripts/get_release.py / COPY scripts/install_drivers.sh /