@@ -33,8 +33,8 @@ RUN set -eux; \
33
33
wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
34
34
| tar -C /usr/local -xz
35
35
36
- ENV GOPATH /go
37
- ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
36
+ ENV GOPATH= /go
37
+ ENV PATH= $GOPATH/bin:/usr/local/go/bin:$PATH
38
38
39
39
WORKDIR /build
40
40
COPY . .
@@ -50,22 +50,11 @@ FROM redhat/ubi9-minimal:latest AS minimal
50
50
RUN rpm -qa --queryformat='^%{NAME}-\[ 0-9\] .*\. %{ARCH}$\n ' | sort -u > /tmp/package-names.minimal
51
51
RUN rpm -qa | sort -u > /tmp/package-list.minimal
52
52
53
- # We define the following image as a base image and remove unneeded packages.
54
- FROM nvcr.io/nvidia/cuda:12.9.0-base-ubi9 AS base
53
+ FROM nvcr.io/nvidia/distroless/go:v3.1.9-dev
55
54
56
- WORKDIR /cleanup
57
-
58
- COPY --from=minimal /tmp/package-names.minimal package-names.minimal
59
- COPY --from=minimal /tmp/package-list.minimal package-list.minimal
60
- COPY deployments/container/cleanup/* .
61
-
62
- RUN ./cleanup.sh
63
-
64
- WORKDIR /
65
-
66
- # We use the base images constructed above.
67
- # TODO: We will move to a shared base image once this implementation has been stabilized.
68
- FROM base
55
+ USER 0:0
56
+ SHELL ["/busybox/sh" , "-c" ]
57
+ RUN ln -s /busybox/sh /bin/sh
69
58
70
59
ENV NVIDIA_DISABLE_REQUIRE="true"
71
60
ENV NVIDIA_VISIBLE_DEVICES=all
@@ -83,7 +72,7 @@ LABEL release="N/A"
83
72
LABEL summary="NVIDIA device plugin for Kubernetes"
84
73
LABEL description="See summary"
85
74
86
- RUN mkdir /licenses && mv /NGC-DL-CONTAINER- LICENSE /licenses/NGC-DL-CONTAINER-LICENSE
75
+ COPY LICENSE /licenses/
87
76
88
77
COPY --from=build /artifacts/config-manager /usr/bin/config-manager
89
78
COPY --from=build /artifacts/gpu-feature-discovery /usr/bin/gpu-feature-discovery
0 commit comments