File tree Expand file tree Collapse file tree 3 files changed +24
-9
lines changed Expand file tree Collapse file tree 3 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ FROM ${BASE_IMAGE} as build
55ARG TARGETARCH
66ARG GOLANG_VERSION
77
8+ # Arg to indicate if driver type is either of passthrough(baremetal) or vgpu
9+ ARG DRIVER_TYPE=passthrough
10+ ENV DRIVER_TYPE=$DRIVER_TYPE
11+
812SHELL ["/bin/bash" , "-c" ]
913
1014RUN dnf install -y git wget
@@ -18,10 +22,11 @@ ENV PATH /usr/local/go/bin:$PATH
1822
1923WORKDIR /work
2024
21- RUN git clone https://github.com/NVIDIA/gpu-driver-container driver && \
25+ RUN if [ "$DRIVER_TYPE" = "vgpu" ]; then \
26+ git clone https://github.com/NVIDIA/gpu-driver-container driver && \
2227 cd driver/vgpu/src && \
2328 go build -o vgpu-util && \
24- mv vgpu-util /work
29+ mv vgpu-util /work; fi
2530
2631FROM nvcr.io/nvidia/cuda:13.0.1-base-ubi9
2732
@@ -78,7 +83,7 @@ COPY nvidia-driver /usr/local/bin
7883COPY ocp_dtk_entrypoint /usr/local/bin
7984COPY common.sh /usr/local/bin
8085
81- COPY --from=build /work/vgpu-util /usr/local/bin
86+ COPY --from=build /work/vgpu-util* /usr/local/bin
8287
8388WORKDIR /drivers
8489
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ FROM nvcr.io/nvidia/cuda:13.0.1-base-ubuntu22.04 as build
33ARG TARGETARCH
44ARG GOLANG_VERSION
55
6+ # Arg to indicate if driver type is either of passthrough(baremetal) or vgpu
7+ ARG DRIVER_TYPE=passthrough
8+ ENV DRIVER_TYPE=$DRIVER_TYPE
9+
610SHELL ["/bin/bash" , "-c" ]
711
812RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
@@ -27,10 +31,11 @@ ENV PATH /usr/local/go/bin:$PATH
2731
2832WORKDIR /work
2933
30- RUN git clone https://github.com/NVIDIA/gpu-driver-container driver && \
34+ RUN if [ "$DRIVER_TYPE" = "vgpu" ]; then \
35+ git clone https://github.com/NVIDIA/gpu-driver-container driver && \
3136 cd driver/vgpu/src && \
3237 go build -o vgpu-util && \
33- mv vgpu-util /work
38+ mv vgpu-util /work; fi
3439
3540FROM nvcr.io/nvidia/cuda:13.0.1-base-ubuntu22.04
3641
@@ -71,7 +76,7 @@ RUN /tmp/install.sh reposetup && /tmp/install.sh depinstall && \
7176
7277COPY nvidia-driver /usr/local/bin
7378
74- COPY --from=build /work/vgpu-util /usr/local/bin
79+ COPY --from=build /work/vgpu-util* /usr/local/bin
7580
7681ADD drivers drivers/
7782
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ FROM ${BASE_IMAGE} as build
55ARG TARGETARCH
66ARG GOLANG_VERSION
77
8+ # Arg to indicate if driver type is either of passthrough(baremetal) or vgpu
9+ ARG DRIVER_TYPE=passthrough
10+ ENV DRIVER_TYPE=$DRIVER_TYPE
11+
812SHELL ["/bin/bash" , "-c" ]
913
1014RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
@@ -31,10 +35,11 @@ ENV PATH /usr/local/go/bin:$PATH
3135
3236WORKDIR /work
3337
34- RUN git clone https://github.com/NVIDIA/gpu-driver-container driver && \
38+ RUN if [ "$DRIVER_TYPE" = "vgpu" ]; then \
39+ git clone https://github.com/NVIDIA/gpu-driver-container driver && \
3540 cd driver/vgpu/src && \
3641 go build -o vgpu-util && \
37- mv vgpu-util /work
42+ mv vgpu-util /work; fi
3843
3944FROM ${BASE_IMAGE}
4045
@@ -70,7 +75,7 @@ RUN usermod -o -u 0 -g 0 _apt && \
7075
7176COPY nvidia-driver /usr/local/bin
7277
73- COPY --from=build /work/vgpu-util /usr/local/bin
78+ COPY --from=build /work/vgpu-util* /usr/local/bin
7479
7580ADD drivers drivers/
7681
You can’t perform that action at this time.
0 commit comments