Skip to content

Commit 3565b58

Browse files
authored
Revert "[SYCL][Devops] Fix DockerFile linting issues discovered by 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.
1 parent fe88f1d commit 3565b58

8 files changed

+5
-26
lines changed

devops/containers/ubuntu2204_base.Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ COPY actions/cleanup /actions/cleanup
2929
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
3030
COPY scripts/install_drivers.sh /opt/install_drivers.sh
3131

32-
USER sycl
33-
3432
ENTRYPOINT ["/docker_entrypoint.sh"]

devops/containers/ubuntu2204_build.Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ gpg --dearmor | tee /etc/apt/keyrings/rocm.gpg > /dev/null && \
2424
# Add rocm repo
2525
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.1.1 jammy main" \
2626
| tee --append /etc/apt/sources.list.d/rocm.list && \
27-
printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | tee /etc/apt/preferences.d/rocm-pin-600
27+
printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | tee /etc/apt/preferences.d/rocm-pin-600 && \
28+
apt update
2829
# Install the kernel driver
29-
RUN apt update && apt install -yqq rocm-dev && \
30+
RUN apt install -yqq rocm-dev && \
3031
apt-get clean && \
3132
rm -rf /var/lib/apt/lists/*
3233

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

4243
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
4344

44-
USER sycl
45-
4645
ENTRYPOINT ["/docker_entrypoint.sh"]
4746

devops/containers/ubuntu2204_intel_drivers.Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,5 @@ RUN --mount=type=secret,id=github_token \
2525

2626
COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh
2727

28-
USER sycl
29-
3028
ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"]
3129

devops/containers/ubuntu2204_preinstalled.Dockerfile

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,5 @@ ADD sycl_linux.tar.gz /opt/sycl/
1010
ENV PATH /opt/sycl/bin:$PATH
1111
ENV LD_LIBRARY_PATH /opt/sycl/lib:$LD_LIBRARY_PATH
1212

13-
# By default Ubuntu sets an arbitrary UID value, that is different from host
14-
# system. When CI passes default UID value of 1001, some of LLVM tools fail to
15-
# discover user home directory and fail a few LIT tests. Fixes UID and GID to
16-
# 1001, that is used as default by GitHub Actions.
17-
RUN groupadd -g 1001 sycl && useradd sycl -u 1001 -g 1001 -m -s /bin/bash
18-
# Add sycl user to video/irc groups so that it can access GPU
19-
RUN usermod -aG video sycl
20-
RUN usermod -aG irc sycl
21-
22-
USER sycl
23-
2413
ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"]
2514

devops/containers/ubuntu2404_base.Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ COPY actions/cleanup /actions/cleanup
2929
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
3030
COPY scripts/install_drivers.sh /opt/install_drivers.sh
3131

32-
USER sycl
33-
3432
ENTRYPOINT ["/docker_entrypoint.sh"]

devops/containers/ubuntu2404_intel_drivers.Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,5 @@ RUN --mount=type=secret,id=github_token \
2525

2626
COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh
2727

28-
USER sycl
29-
3028
ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"]
3129

devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,5 @@ RUN --mount=type=secret,id=github_token \
2020

2121
COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh
2222

23-
USER sycl
24-
2523
ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"]
2624

devops/scripts/docker_entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/bash
22

33
if [ -d "$GITHUB_WORKSPACE" ]; then
4-
sudo chown -R sycl:sycl $GITHUB_WORKSPACE
4+
chown -R sycl:sycl $GITHUB_WORKSPACE
5+
su sycl
56
fi
67

78
exec "$@"

0 commit comments

Comments
 (0)