Skip to content

Commit a57826b

Browse files
fix: actually build NFD in the nvidia dockerfile (#7)
Signed-off-by: Alexander Maslennikov <[email protected]>
1 parent 10cdc5c commit a57826b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Dockerfile.nvidia

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ COPY api/nfd/go.mod api/nfd/go.sum /go/node-feature-discovery/api/nfd/
88

99
WORKDIR /go/node-feature-discovery
1010

11+
RUN --mount=type=cache,target=/go/pkg/mod/ \
12+
go mod download
13+
1114
# Do actual build
1215
COPY . /go/node-feature-discovery
1316

14-
ARG VERSION
15-
ARG HOSTMOUNT_PREFIX
17+
RUN --mount=type=cache,target=/go/pkg/mod/ \
18+
make install VERSION=v0.0.0
1619

1720
# Create minimal variant of the production image
1821
FROM nvcr.io/nvidia/distroless/go:v3.1.8 AS final
@@ -26,4 +29,4 @@ ENV GRPC_GO_LOG_SEVERITY_LEVEL="INFO"
2629
COPY --from=builder /go/node-feature-discovery/deployment/components/worker-config/nfd-worker.conf.example /etc/kubernetes/node-feature-discovery/nfd-worker.conf
2730
COPY --from=builder /go/bin/* /usr/bin/
2831
#Copy the source code to the image
29-
COPY --from=builder . /usr/src/node-feature-discovery
32+
COPY --from=builder . /usr/src/node-feature-discovery

0 commit comments

Comments
 (0)