Skip to content

Commit

Permalink
Revert "[SYCL][Devops] Fix DockerFile linting issues discovered by …
Browse files Browse the repository at this point in the history
…trivy" (#16346)

Reverts #16290

Discussed with Alexey offline, reverting for now until we can address
some more issues.

CI failures expected, it's not actually using the changes in this PR.
  • Loading branch information
sarnex authored Dec 12, 2024
1 parent fe88f1d commit 3565b58
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 26 deletions.
2 changes: 0 additions & 2 deletions devops/containers/ubuntu2204_base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@ COPY actions/cleanup /actions/cleanup
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
COPY scripts/install_drivers.sh /opt/install_drivers.sh

USER sycl

ENTRYPOINT ["/docker_entrypoint.sh"]
7 changes: 3 additions & 4 deletions devops/containers/ubuntu2204_build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ gpg --dearmor | tee /etc/apt/keyrings/rocm.gpg > /dev/null && \
# Add rocm repo
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.1.1 jammy main" \
| tee --append /etc/apt/sources.list.d/rocm.list && \
printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | tee /etc/apt/preferences.d/rocm-pin-600
printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | tee /etc/apt/preferences.d/rocm-pin-600 && \
apt update
# Install the kernel driver
RUN apt update && apt install -yqq rocm-dev && \
RUN apt install -yqq rocm-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -41,7 +42,5 @@ RUN usermod -aG irc sycl

COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh

USER sycl

ENTRYPOINT ["/docker_entrypoint.sh"]

2 changes: 0 additions & 2 deletions devops/containers/ubuntu2204_intel_drivers.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@ RUN --mount=type=secret,id=github_token \

COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh

USER sycl

ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"]

11 changes: 0 additions & 11 deletions devops/containers/ubuntu2204_preinstalled.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,5 @@ 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"]

2 changes: 0 additions & 2 deletions devops/containers/ubuntu2404_base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@ COPY actions/cleanup /actions/cleanup
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
COPY scripts/install_drivers.sh /opt/install_drivers.sh

USER sycl

ENTRYPOINT ["/docker_entrypoint.sh"]
2 changes: 0 additions & 2 deletions devops/containers/ubuntu2404_intel_drivers.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@ RUN --mount=type=secret,id=github_token \

COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh

USER sycl

ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"]

2 changes: 0 additions & 2 deletions devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@ RUN --mount=type=secret,id=github_token \

COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh

USER sycl

ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"]

3 changes: 2 additions & 1 deletion devops/scripts/docker_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

if [ -d "$GITHUB_WORKSPACE" ]; then
sudo chown -R sycl:sycl $GITHUB_WORKSPACE
chown -R sycl:sycl $GITHUB_WORKSPACE
su sycl
fi

exec "$@"

0 comments on commit 3565b58

Please sign in to comment.