Skip to content

Commit 576c786

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

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

kind-gpu-sim.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ EOF
117117

118118
function build_and_push_images() {
119119
gpu_type="$1"
120+
cr_flag=""
120121

121122
if [ "$gpu_type" = "nvidia" ]; then
122123
echo " Building NVIDIA device plugin locally..."
@@ -129,14 +130,16 @@ function build_and_push_images() {
129130
sed -i 's|^FROM public.ecr.aws/ubi9/ubi-minimal|FROM registry.access.redhat.com/ubi9/ubi-minimal|' deployments/container/Dockerfile
130131
sed -i 's|^FROM registry.access.redhat.com/ubi9/ubi9-minimal|FROM registry.access.redhat.com/ubi9/ubi-minimal|' deployments/container/Dockerfile
131132
grep FROM deployments/container/Dockerfile
133+
cr_flag="--format docker"
132134
fi
133135

134-
REGISTRY=localhost:${REGISTRY_PORT} GOLANG_VERSION=1.21.6 VERSION=dev make -f deployments/container/Makefile build # Always builds with docker
136+
cr build --build-arg GOLANG_VERSION=1.21.6 \
137+
-t localhost:${REGISTRY_PORT}/nvidia-device-plugin:dev \
138+
-f deployments/container/Dockerfile .
135139

136140
if [ "$CONTAINER_RUNTIME" = "docker" ]; then
137141
cr push localhost:${REGISTRY_PORT}/nvidia-device-plugin:dev
138142
else
139-
docker save localhost:${REGISTRY_PORT}/nvidia-device-plugin:dev | podman load
140143
cr tag localhost:${REGISTRY_PORT}/nvidia-device-plugin:dev localhost/nvidia-device-plugin:dev
141144
cr save localhost/nvidia-device-plugin:dev -o /tmp/image.tar
142145
kind load image-archive /tmp/image.tar --name "$CLUSTER_NAME"

0 commit comments

Comments
 (0)