@@ -24,7 +24,9 @@ ARG ROCKYLINUX=1
24
24
ARG BUILD_BASE=rockylinux:9
25
25
ARG FINAL_BASE_DYN=registry.access.redhat.com/ubi9/ubi-minimal:9.3
26
26
# ##
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
28
30
ARG DIR=/intel-device-plugins-for-kubernetes
29
31
ENV CGO_CFLAGS="-pipe -fno-plt"
30
32
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
38
40
ARG CGO_VERSION=1.23
39
41
RUN mkdir /runtime
40
42
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 && \
42
46
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 && \
49
55
rm -rf /var/lib/apt/lists/\* ; \
50
56
else \
51
57
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
61
67
ARG CMD
62
68
WORKDIR ${DIR}
63
69
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} && \
65
73
GO111MODULE=on CGO_ENABLED=1 go install $CGOFLAGS --gcflags="$GCFLAGS" --asmflags="$ASMFLAGS" --ldflags="$LDFLAGS"
66
74
RUN [ $ROCKYLINUX -eq 0 ] && install -D /go/bin/${CMD} /install_root${EP} || install -D /root/go/bin/${CMD} /install_root${EP}
67
75
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
@@ -77,7 +85,7 @@ COPY --from=builder /runtime /runtime
77
85
RUN if [ $ROCKYLINUX -eq 0 ]; then \
78
86
apt-get update && apt-get install --no-install-recommends -y ocl-icd-libopencl1 && \
79
87
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 && \
81
89
rm "/lib/x86_64-linux-gnu/libze_validation" * && rm "/lib/x86_64-linux-gnu/libze_tracing_layer" *; \
82
90
else \
83
91
cp -a /runtime//*.so* /usr/lib64/ && cp -a /runtime/OpenCL /etc/ && cp -a /runtime/licenses/* /usr/share/licenses/; \
0 commit comments