Skip to content

Commit c55bb71

Browse files
committed
gpu levelzero: update the components to support LunarLake
Also install the igc-core components as they seem to be required. Sadly the container size will increase with little benefit. Signed-off-by: Tuomas Katila <[email protected]>
1 parent 12f1225 commit c55bb71

File tree

2 files changed

+37
-20
lines changed

2 files changed

+37
-20
lines changed

build/docker/intel-gpu-levelzero.Dockerfile

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ ARG ROCKYLINUX=1
2424
ARG BUILD_BASE=rockylinux:9
2525
ARG FINAL_BASE_DYN=registry.access.redhat.com/ubi9/ubi-minimal:9.3
2626
###
27-
FROM ${BUILD_BASE} AS builder
27+
## Use the BUILD_BASE when either the a) golang-bookworm is updated to a newer glibc
28+
## or b) the intel-igc-core libraries are fixed to not to demand a newer glibc
29+
FROM ${FINAL_BASE_DYN} AS builder
2830
ARG DIR=/intel-device-plugins-for-kubernetes
2931
ENV CGO_CFLAGS="-pipe -fno-plt"
3032
ENV CGO_LDFLAGS="-fstack-protector-strong -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now,-z,noexecstack,-z,defs,-s,-w"
@@ -38,14 +40,18 @@ ARG ROCKYLINUX
3840
ARG CGO_VERSION=1.23
3941
RUN mkdir /runtime
4042
RUN if [ $ROCKYLINUX -eq 0 ]; then \
41-
apt-get update && apt-get install --no-install-recommends -y wget libc6-dev ca-certificates ocl-icd-libopencl1 && \
43+
apt-get update && apt-get install --no-install-recommends -y wget jq curl libc6-dev ocl-icd-libopencl1 gcc ca-certificates && \
44+
LATEST_GO=$(curl --no-progress-meter https://go.dev/dl/?mode=json | jq ".[] | select(.version | startswith(\"go${CGO_VERSION}\")).version" | tr -d "\"") && \
45+
wget -q https://go.dev/dl/$LATEST_GO.linux-amd64.tar.gz -O - | tar -xz -C /usr/local && \
4246
cd /runtime && \
43-
wget -q https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/intel-level-zero-gpu_1.3.30049.6_amd64.deb && \
44-
wget -q https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/intel-opencl-icd_24.26.30049.6_amd64.deb && \
45-
wget -q https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/libigdgmm12_22.3.20_amd64.deb && \
46-
wget -q https://github.com/oneapi-src/level-zero/releases/download/v1.17.6/level-zero-devel_1.17.6+u22.04_amd64.deb && \
47-
wget -q https://github.com/oneapi-src/level-zero/releases/download/v1.17.6/level-zero_1.17.6+u22.04_amd64.deb && \
48-
dpkg --ignore-depends=intel-igc-core,intel-igc-opencl -i *.deb && \
47+
wget -q https://github.com/intel/compute-runtime/releases/download/25.09.32961.7/intel-level-zero-gpu_1.6.32961.7_amd64.deb && \
48+
wget -q https://github.com/intel/compute-runtime/releases/download/25.09.32961.7/intel-opencl-icd_25.09.32961.7_amd64.deb && \
49+
wget -q https://github.com/intel/compute-runtime/releases/download/25.09.32961.7/libigdgmm12_22.6.0_amd64.deb && \
50+
wget -q https://github.com/oneapi-src/level-zero/releases/download/v1.20.2/level-zero-devel_1.20.2+u22.04_amd64.deb && \
51+
wget -q https://github.com/oneapi-src/level-zero/releases/download/v1.20.2/level-zero_1.20.2+u22.04_amd64.deb && \
52+
wget -q https://github.com/intel/intel-graphics-compiler/releases/download/v2.8.3/intel-igc-core-2_2.8.3+18762_amd64.deb && \
53+
wget -q https://github.com/intel/intel-graphics-compiler/releases/download/v2.8.3/intel-igc-opencl-2_2.8.3+18762_amd64.deb && \
54+
dpkg -i *.deb && \
4955
rm -rf /var/lib/apt/lists/\*; \
5056
else \
5157
source /etc/os-release && dnf install -y gcc jq wget 'dnf-command(config-manager)' && \
@@ -61,7 +67,9 @@ ARG EP=/usr/local/bin/intel_gpu_levelzero
6167
ARG CMD
6268
WORKDIR ${DIR}
6369
COPY . .
64-
RUN export PATH=$PATH:/usr/local/go/bin/ && cd cmd/${CMD} && \
70+
## Apply for the build phase as well as the license copy below the build.
71+
ENV PATH=$PATH:/usr/local/go/bin/
72+
RUN cd cmd/${CMD} && \
6573
GO111MODULE=on CGO_ENABLED=1 go install $CGOFLAGS --gcflags="$GCFLAGS" --asmflags="$ASMFLAGS" --ldflags="$LDFLAGS"
6674
RUN [ $ROCKYLINUX -eq 0 ] && install -D /go/bin/${CMD} /install_root${EP} || install -D /root/go/bin/${CMD} /install_root${EP}
6775
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
@@ -77,7 +85,7 @@ COPY --from=builder /runtime /runtime
7785
RUN if [ $ROCKYLINUX -eq 0 ]; then \
7886
apt-get update && apt-get install --no-install-recommends -y ocl-icd-libopencl1 && \
7987
rm /runtime/level-zero-devel_*.deb && \
80-
cd /runtime && dpkg --ignore-depends=intel-igc-core,intel-igc-opencl -i *.deb && rm -rf /runtime && \
88+
cd /runtime && dpkg -i *.deb && rm -rf /runtime && \
8189
rm "/lib/x86_64-linux-gnu/libze_validation"* && rm "/lib/x86_64-linux-gnu/libze_tracing_layer"*; \
8290
else \
8391
cp -a /runtime//*.so* /usr/lib64/ && cp -a /runtime/OpenCL /etc/ && cp -a /runtime/licenses/* /usr/share/licenses/; \

build/docker/templates/intel-gpu-levelzero.Dockerfile.in

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ ARG BUILD_BASE=rockylinux:9
1212
ARG FINAL_BASE_DYN=registry.access.redhat.com/ubi9/ubi-minimal:9.3
1313
###
1414

15-
FROM ${BUILD_BASE} AS builder
15+
## Use the BUILD_BASE when either the a) golang-bookworm is updated to a newer glibc
16+
## or b) the intel-igc-core libraries are fixed to not to demand a newer glibc
17+
FROM ${FINAL_BASE_DYN} AS builder
1618

1719
ARG DIR=/intel-device-plugins-for-kubernetes
1820

@@ -31,14 +33,18 @@ ARG CGO_VERSION=1.23
3133
RUN mkdir /runtime
3234

3335
RUN if [ $ROCKYLINUX -eq 0 ]; then \N
34-
apt-get update && apt-get install --no-install-recommends -y wget libc6-dev ca-certificates ocl-icd-libopencl1 && \N
36+
apt-get update && apt-get install --no-install-recommends -y wget jq curl libc6-dev ocl-icd-libopencl1 gcc ca-certificates && \N
37+
LATEST_GO=$(curl --no-progress-meter https://go.dev/dl/?mode=json | jq ".[] | select(.version | startswith(\"go${CGO_VERSION}\")).version" | tr -d "\"") && \N
38+
wget -q https://go.dev/dl/$LATEST_GO.linux-amd64.tar.gz -O - | tar -xz -C /usr/local && \N
3539
cd /runtime && \N
36-
wget -q https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/intel-level-zero-gpu_1.3.30049.6_amd64.deb && \N
37-
wget -q https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/intel-opencl-icd_24.26.30049.6_amd64.deb && \N
38-
wget -q https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/libigdgmm12_22.3.20_amd64.deb && \N
39-
wget -q https://github.com/oneapi-src/level-zero/releases/download/v1.17.6/level-zero-devel_1.17.6+u22.04_amd64.deb && \N
40-
wget -q https://github.com/oneapi-src/level-zero/releases/download/v1.17.6/level-zero_1.17.6+u22.04_amd64.deb && \N
41-
dpkg --ignore-depends=intel-igc-core,intel-igc-opencl -i *.deb && \N
40+
wget -q https://github.com/intel/compute-runtime/releases/download/25.09.32961.7/intel-level-zero-gpu_1.6.32961.7_amd64.deb && \N
41+
wget -q https://github.com/intel/compute-runtime/releases/download/25.09.32961.7/intel-opencl-icd_25.09.32961.7_amd64.deb && \N
42+
wget -q https://github.com/intel/compute-runtime/releases/download/25.09.32961.7/libigdgmm12_22.6.0_amd64.deb && \N
43+
wget -q https://github.com/oneapi-src/level-zero/releases/download/v1.20.2/level-zero-devel_1.20.2+u22.04_amd64.deb && \N
44+
wget -q https://github.com/oneapi-src/level-zero/releases/download/v1.20.2/level-zero_1.20.2+u22.04_amd64.deb && \N
45+
wget -q https://github.com/intel/intel-graphics-compiler/releases/download/v2.8.3/intel-igc-core-2_2.8.3+18762_amd64.deb && \N
46+
wget -q https://github.com/intel/intel-graphics-compiler/releases/download/v2.8.3/intel-igc-opencl-2_2.8.3+18762_amd64.deb && \N
47+
dpkg -i *.deb && \N
4248
rm -rf /var/lib/apt/lists/\*; \N
4349
else \N
4450
source /etc/os-release && dnf install -y gcc jq wget 'dnf-command(config-manager)' && \N
@@ -57,7 +63,10 @@ ARG CMD
5763
WORKDIR ${DIR}
5864
COPY . .
5965

60-
RUN export PATH=$PATH:/usr/local/go/bin/ && cd cmd/${CMD} && \N
66+
## Apply for the build phase as well as the license copy below the build.
67+
ENV PATH=$PATH:/usr/local/go/bin/
68+
69+
RUN cd cmd/${CMD} && \N
6170
GO111MODULE=on CGO_ENABLED=1 go install $CGOFLAGS --gcflags="$GCFLAGS" --asmflags="$ASMFLAGS" --ldflags="$LDFLAGS"
6271
RUN [ $ROCKYLINUX -eq 0 ] && install -D /go/bin/${CMD} /install_root${EP} || install -D /root/go/bin/${CMD} /install_root${EP}
6372

@@ -73,7 +82,7 @@ COPY --from=builder /runtime /runtime
7382
RUN if [ $ROCKYLINUX -eq 0 ]; then \N
7483
apt-get update && apt-get install --no-install-recommends -y ocl-icd-libopencl1 && \N
7584
rm /runtime/level-zero-devel_*.deb && \N
76-
cd /runtime && dpkg --ignore-depends=intel-igc-core,intel-igc-opencl -i *.deb && rm -rf /runtime && \N
85+
cd /runtime && dpkg -i *.deb && rm -rf /runtime && \N
7786
rm "/lib/x86_64-linux-gnu/libze_validation"* && rm "/lib/x86_64-linux-gnu/libze_tracing_layer"*; \N
7887
else \N
7988
cp -a /runtime//*.so* /usr/lib64/ && cp -a /runtime/OpenCL /etc/ && cp -a /runtime/licenses/* /usr/share/licenses/; \N

0 commit comments

Comments
 (0)