Skip to content

Commit d04fc8b

Browse files
fix: nvidia-device-plugin no version info (#779)
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
1 parent cbccbd4 commit d04fc8b

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ docker:
99
--build-arg TARGET_ARCH=${TARGET_ARCH} \
1010
--build-arg NVIDIA_IMAGE=${NVIDIA_IMAGE} \
1111
--build-arg DEST_DIR=${DEST_DIR} \
12+
--build-arg VERSION=${VERSION} \
1213
--build-arg GOPROXY=https://goproxy.cn,direct \
1314
. -f=docker/Dockerfile -t ${IMG_TAG}
1415

@@ -19,6 +20,7 @@ dockerwithlib:
1920
--build-arg TARGET_ARCH=${TARGET_ARCH} \
2021
--build-arg NVIDIA_IMAGE=${NVIDIA_IMAGE} \
2122
--build-arg DEST_DIR=${DEST_DIR} \
23+
--build-arg VERSION=${VERSION} \
2224
--build-arg GOPROXY=https://goproxy.cn,direct \
2325
. -f=docker/Dockerfile.withlib -t ${IMG_TAG}
2426

docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ ARG NVIDIA_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu20.04
44
FROM $GOLANG_IMAGE AS build
55
FROM $GOLANG_IMAGE AS gobuild
66
ARG GOPROXY
7+
ARG VERSION
78
ADD . /k8s-vgpu
89
#RUN --mount=type=cache,target=/go/pkg/mod \
910
# cd /k8s-vgpu && make all
10-
RUN cd /k8s-vgpu && make all
11+
RUN cd /k8s-vgpu && make all VERSION=$VERSION
1112
RUN go install github.com/NVIDIA/mig-parted/cmd/nvidia-mig-parted@latest
1213

1314
FROM $NVIDIA_IMAGE AS nvbuild

docker/Dockerfile.withlib

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ FROM $GOLANG_IMAGE AS build
55
FROM $GOLANG_IMAGE AS GOBUILD
66
ADD . /k8s-vgpu
77
ARG GOPROXY=https://goproxy.cn,direct
8+
ARG VERSION
89
RUN go env -w GO111MODULE=on
9-
RUN cd /k8s-vgpu && make all
10+
RUN cd /k8s-vgpu && make all VERSION=$VERSION
1011
RUN go install github.com/NVIDIA/mig-parted/cmd/nvidia-mig-parted@latest
1112

1213
#FROM ubuntu:24.04

0 commit comments

Comments
 (0)