Skip to content

Commit 3960550

Browse files
committed
chore: fix build
Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
1 parent e75b39c commit 3960550

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

kind-gpu-sim.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,21 @@ function build_and_push_images() {
129129
sed -i 's|^FROM public.ecr.aws/ubi9/ubi-minimal|FROM registry.access.redhat.com/ubi9/ubi-minimal|' deployments/container/Dockerfile
130130
sed -i 's|^FROM registry.access.redhat.com/ubi9/ubi9-minimal|FROM registry.access.redhat.com/ubi9/ubi-minimal|' deployments/container/Dockerfile
131131
grep FROM deployments/container/Dockerfile
132-
fi
133-
134-
REGISTRY=localhost:${REGISTRY_PORT} GOLANG_VERSION=1.21.6 VERSION=dev make -f deployments/container/Makefile build # Always builds with docker
135-
136-
if [ "$CONTAINER_RUNTIME" = "docker" ]; then
137-
cr push localhost:${REGISTRY_PORT}/nvidia-device-plugin:dev
138-
else
139-
docker save localhost:${REGISTRY_PORT}/nvidia-device-plugin:dev | podman load
132+
GOLANG_VERSION=1.21.6 BUILDAH_FORMAT=docker cr build \
133+
-t localhost:${REGISTRY_PORT}/nvidia-device-plugin:dev \
134+
-f deployments/container/Dockerfile .
140135
cr tag localhost:${REGISTRY_PORT}/nvidia-device-plugin:dev localhost/nvidia-device-plugin:dev
141136
cr save localhost/nvidia-device-plugin:dev -o /tmp/image.tar
142137
kind load image-archive /tmp/image.tar --name "$CLUSTER_NAME"
143138
rm -f /tmp/image.tar
139+
else
140+
GOLANG_VERSION=1.21.6 cr build \
141+
-t localhost:${REGISTRY_PORT}/nvidia-device-plugin:dev \
142+
-f deployments/container/Dockerfile .
143+
cr push localhost:${REGISTRY_PORT}/nvidia-device-plugin:dev
144+
144145
fi
146+
145147
cd ..
146148
return
147149
fi

0 commit comments

Comments
 (0)