File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 117117
118118function 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 "
You can’t perform that action at this time.
0 commit comments