Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
733 lines (652 loc) · 34.8 KB
/
Copy pathMakefile
File metadata and controls
733 lines (652 loc) · 34.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
# https://stackoverflow.com/questions/18136918/how-to-get-current-relative-directory-of-your-makefile
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
SELF ::= $(firstword $(MAKEFILE_LIST))
# https://tech.davis-hansson.com/p/make/
SHELL := bash
.ONESHELL:
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
.SHELLFLAGS := -Eeux -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
# Used where we need an empty expansion (avoids undefined variable warning).
empty :=
# todo: leave the default recipe prefix for now
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX =
IMAGE_REGISTRY ?= quay.io/opendatahub/workbench-images
RELEASE ?= 3.6
RELEASE_PYTHON_VERSION ?= 3.12
CHECK_PAYLOAD_VERSION ?= 0.3.17
CHECK_PAYLOAD_CONFIG_OVERLAY := scripts/check-payload/.overlay.toml
# additional user-specified caching parameters for $(CONTAINER_ENGINE) build
CONTAINER_BUILD_CACHE_ARGS ?= --no-cache
# security options for podman (label=disable fixes permission denied on macOS rootful)
CONTAINER_BUILD_SECURITY_ARGS ?= $(if $(filter podman,$(CONTAINER_ENGINE)),--security-opt label=disable,)
# whether to push the images to a registry as they are built
PUSH_IMAGES ?= yes
# INDEX_MODE: auto (default), public-index, or rh-index - controls lock file generation
INDEX_MODE ?= auto
# PRODUCT: select ODH (odh) vs RHOAI (rhoai) build-args conf files
PRODUCT ?= odh
ifneq ($(filter odh rhoai,$(PRODUCT)),$(PRODUCT))
$(error PRODUCT must be 'odh' or 'rhoai', got '$(PRODUCT)')
endif
# OS dependant: Generate date, select appropriate cmd to locate container engine
ifdef OS
ifeq ($(OS), Windows_NT)
DATE ?= $(shell powershell -Command "Get-Date -Format 'yyyyMMdd'")
WHERE_WHICH ?= where
endif
endif
DATE ?= $(shell date +'%Y%m%d')
WHERE_WHICH ?= which
# linux/amd64 or darwin/arm64
OS_ARCH=$(shell go env GOOS)/$(shell go env GOARCH)
BUILD_ARCH ?= linux/amd64
# Map OCI platform arch to RPM arch (e.g. linux/amd64 → x86_64, linux/arm64 → aarch64)
RPM_ARCH := $(subst amd64,x86_64,$(subst arm64,aarch64,$(lastword $(subst /, ,$(BUILD_ARCH)))))
IMAGE_TAG ?= $(RELEASE)_$(DATE)
KUBECTL_BIN ?= bin/kubectl
KUBECTL_VERSION ?= v1.23.11
YQ_BIN ?= bin/yq
YQ_VERSION ?= v4.44.6
NOTEBOOK_REPO_BRANCH_BASE ?= https://raw.githubusercontent.com/opendatahub-io/notebooks/main
REQUIRED_RUNTIME_IMAGE_COMMANDS="curl python3"
REQUIRED_CODE_SERVER_IMAGE_COMMANDS="curl python oc code-server"
# Detect and select the system's available container engine
ifeq (, $(shell $(WHERE_WHICH) podman))
DOCKER := $(shell $(WHERE_WHICH) docker)
ifeq (, $(DOCKER))
$(error "Neither Docker nor Podman is installed. Please install one of them.")
endif
CONTAINER_ENGINE := docker
else
CONTAINER_ENGINE := podman
endif
# Build function for the notebook image:
# ARG 1: Image tag name.
# ARG 2: Path of Dockerfile we want to build.
# ARG 3: Path of the build-args conf file to use.
define build_image
$(eval IMAGE_NAME := $(IMAGE_REGISTRY):$(1)-$(IMAGE_TAG))
# Checks if there’s a build-args/*.conf matching the Dockerfile
$(eval BUILD_DIR := $(dir $(2)))
$(eval DOCKERFILE_NAME := $(notdir $(2)))
$(eval CONF_FILE := $(3))
# if the conf file exists, transform it into quoted --build-arg flags
# NOTE: lines must match KEY=VALUE; single quotes in values are escaped
$(eval _BUILD_ARGS_OUT := $(shell \
if [ -f '$(CONF_FILE)' ]; then \
awk '!/^[[:space:]]*#/ && NF { \
gsub(/^[[:space:]]+|[[:space:]]+$$/, ""); \
if (!/^[A-Za-z_][A-Za-z0-9_]*=/) { \
printf "ERROR: malformed conf line (expected KEY=VALUE): %s\n", $$0 > "/dev/stderr"; \
err=1; next; \
} \
gsub(/\047/, "\047\\\047\047"); \
out = out sprintf("--build-arg \047%s\047 ", $$0); \
} END { if (err) { printf "PARSE_FAILED"; exit 1 } else { printf "%s", out } }' '$(CONF_FILE)'; \
fi))
$(if $(findstring PARSE_FAILED,$(_BUILD_ARGS_OUT)),$(error Failed to parse $(CONF_FILE) — see stderr for details))
$(eval BUILD_ARGS := $(_BUILD_ARGS_OUT))
# Hermetic local build: when cachi2/output/ exists AND this target uses a
# prefetch-input tree, mount pre-downloaded deps into the build.
# Some images (e.g. jupyter/minimal, datascience, pytorch+llmcompressor)
# reference repo-root prefetch-input/ in their Dockerfiles without having
# a local prefetch-input/ directory (symlinks were removed to work around
# Konflux Hermeto rejecting symlink segments in git submodule paths).
# The repos.d mount overlays /etc/yum.repos.d/ with hermeto-generated repos,
# making local builds behave like Konflux (repos already in place when the
# Dockerfile runs). The mount hides the base image's default repos.
# Konflux buildah-oci-ta task mounts YUM_REPOS_D_FETCHED at YUM_REPOS_D_TARGET (/etc/yum.repos.d).
# See https://github.com/konflux-ci/build-definitions/blob/main/task/buildah-oci-ta/
$(eval _DOCKERFILE_USES_PREFETCH := $(shell grep -q 'prefetch-input/' $(2) 2>/dev/null && echo yes))
$(eval PREFETCH_INPUT_DIR := $(or $(wildcard $(BUILD_DIR)prefetch-input),$(if $(_DOCKERFILE_USES_PREFETCH),$(wildcard $(ROOT_DIR)prefetch-input),)))
$(eval CACHI2_VOLUME := $(if $(and $(wildcard cachi2/output),$(PREFETCH_INPUT_DIR)),\
--volume $(ROOT_DIR)cachi2/output:/cachi2/output:Z \
--volume $(ROOT_DIR)cachi2/output/deps/rpm/$(RPM_ARCH)/repos.d/:/etc/yum.repos.d/:Z,))
$(info # Building $(IMAGE_NAME) using $(DOCKERFILE_NAME) with $(CONF_FILE) and $(BUILD_ARGS)...)
@if [ -n '$(PREFETCH_INPUT_DIR)' ] && [ ! -d cachi2/output ]; then \
echo "Prefetch required for hermetic build. Run: scripts/lockfile-generators/prefetch-all.sh --component-dir $(patsubst %/,%,$(BUILD_DIR)) -- see scripts/lockfile-generators/README.md"; \
exit 1; \
fi
@if [ -d cachi2/output ] && [ -n '$(PREFETCH_INPUT_DIR)' ] && [ ! -d 'cachi2/output/deps/rpm/$(RPM_ARCH)/repos.d' ]; then \
echo "Missing RPM repos for $(RPM_ARCH). Re-run: scripts/lockfile-generators/prefetch-all.sh --component-dir $(patsubst %/,%,$(BUILD_DIR))"; \
exit 1; \
fi
$(ROOT_DIR)/scripts/sandbox.py --dockerfile '$(2)' --platform '$(BUILD_ARCH)' -- \
$(CONTAINER_ENGINE) build $(CONTAINER_BUILD_SECURITY_ARGS) $(CONTAINER_BUILD_CACHE_ARGS) $(CACHI2_VOLUME) --platform=$(BUILD_ARCH) --label release=$(RELEASE) --tag $(IMAGE_NAME) --file '$(2)' $(BUILD_ARGS) {}\;
endef
# Push function for the notebook image:
# ARG 1: Path of image context we want to build.
define push_image
$(eval IMAGE_NAME := $(IMAGE_REGISTRY):$(subst /,-,$(1))-$(IMAGE_TAG))
$(info # Pushing $(IMAGE_NAME) image...)
DIGEST_FILE=$$(mktemp)
$(CONTAINER_ENGINE) push --digestfile="$${DIGEST_FILE}" $(IMAGE_NAME)
echo "# Pushed $(IMAGE_NAME)@$$(cat $${DIGEST_FILE})"
rm -f "$${DIGEST_FILE}"
endef
# Build and push the notebook images:
# ARG 1: Image tag name.
# ARG 2: Path of Dockerfile we want to build.
#
# PUSH_IMAGES: allows skipping podman push
define image
$(eval BUILD_DIRECTORY := $(shell echo $(2) | sed 's/\/Dockerfile.*//'))
$(eval VARIANT := $(shell echo $(notdir $(2)) | awk -F. '{print $$NF}'))
$(eval DOCKERFILE := $(BUILD_DIRECTORY)/Dockerfile.konflux.$(VARIANT))
$(if $(wildcard $(DOCKERFILE)),,$(error Dockerfile not found for variant '$(VARIANT)' in '$(BUILD_DIRECTORY)'))
$(eval CONF_FILE := $(BUILD_DIRECTORY)/build-args/$(if $(filter rhoai,$(PRODUCT)),konflux.,)$(shell echo $(VARIANT)).conf)
$(info #*# Image build Dockerfile: <$(DOCKERFILE)> #(MACHINE-PARSED LINE)#*#...)
$(info #*# Image build directory: <$(BUILD_DIRECTORY)> #(MACHINE-PARSED LINE)#*#...)
$(if $(filter rhoai,$(PRODUCT)),\
$(if $(wildcard $(CONF_FILE)),\
$(call build_image,$(1),$(DOCKERFILE),$(CONF_FILE)),\
$(info Skipping RHOAI build for ODH-only target $(1): no $(CONF_FILE))\
),\
$(call build_image,$(1),$(DOCKERFILE),$(CONF_FILE))\
)
$(if $(PUSH_IMAGES:no=),
$(call push_image,$(1))
)
endef
####################################### Build helpers #######################################
# https://stackoverflow.com/questions/78899903/how-to-create-a-make-target-which-is-an-implicit-dependency-for-all-other-target
skip-init-for := all-images deploy% undeploy% test% validate% refresh-lock-files sync-build-args-from-versions sync-commit-env-files update-imagestream-annotations refresh-imagestream-metadata scan-image-vulnerabilities print-release kickoff-release clean-rpm-lockfile-cache check-payload-config
# CI uses the pre-built container image via buildinputs_runner.py instead
ifneq ($(CI),true)
ifneq (,$(filter-out $(skip-init-for),$(MAKECMDGOALS) $(.DEFAULT_GOAL)))
$(SELF): bin/buildinputs
endif
endif
bin/buildinputs: scripts/buildinputs/buildinputs.go scripts/buildinputs/go.mod scripts/buildinputs/go.sum
$(info Building a Go helper for Dockerfile dependency analysis...)
GOTOOLCHAIN=auto GONOSUMDB=golang.org/toolchain \
go build -C "scripts/buildinputs" -o "$(ROOT_DIR)/$@" ./...
.PHONY: check-payload-config
check-payload-config: $(CHECK_PAYLOAD_CONFIG_OVERLAY)
@curl --fail --location --silent --show-error --retry 3 \
"https://raw.githubusercontent.com/openshift/check-payload/$(CHECK_PAYLOAD_VERSION)/config.toml"
@cat "$(CHECK_PAYLOAD_CONFIG_OVERLAY)"
####################################### Buildchain for Python using ubi9 #####################################
.PHONY: jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION)
jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/minimal/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
.PHONY: jupyter-datascience-ubi9-python-$(RELEASE_PYTHON_VERSION)
jupyter-datascience-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/datascience/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
.PHONY: jupyter-universal-ubi9-python-$(RELEASE_PYTHON_VERSION)
jupyter-universal-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/universal/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
.PHONY: cuda-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION)
cuda-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/minimal/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cuda)
.PHONY: cuda-jupyter-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION)
cuda-jupyter-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/tensorflow/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cuda)
.PHONY: cuda-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION)
cuda-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/pytorch/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cuda)
.PHONY: cuda-jupyter-pytorch-llmcompressor-ubi9-python-$(RELEASE_PYTHON_VERSION)
cuda-jupyter-pytorch-llmcompressor-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/pytorch+llmcompressor/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cuda)
.PHONY: jupyter-trustyai-ubi9-python-$(RELEASE_PYTHON_VERSION)
jupyter-trustyai-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/trustyai/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
.PHONY: runtime-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION)
runtime-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,runtimes/minimal/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
.PHONY: runtime-datascience-ubi9-python-$(RELEASE_PYTHON_VERSION)
runtime-datascience-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,runtimes/datascience/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
.PHONY: runtime-cuda-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION)
runtime-cuda-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,runtimes/pytorch/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cuda)
.PHONY: runtime-cuda-pytorch-llmcompressor-ubi9-python-$(RELEASE_PYTHON_VERSION)
runtime-cuda-pytorch-llmcompressor-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,runtimes/pytorch+llmcompressor/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cuda)
.PHONY: runtime-cuda-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION)
runtime-cuda-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,runtimes/tensorflow/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cuda)
.PHONY: codeserver-ubi9-python-$(RELEASE_PYTHON_VERSION)
codeserver-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,codeserver/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
.PHONY: che-code-codeserver-ubi9-python-$(RELEASE_PYTHON_VERSION)
che-code-codeserver-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,codeserver/che-code-ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
####################################### Buildchain for AMD Python using UBI9 #######################################
.PHONY: rocm-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION)
rocm-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/minimal/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.rocm)
.PHONY: rocm-jupyter-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION)
rocm-jupyter-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/rocm/tensorflow/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.rocm)
.PHONY: rocm-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION)
rocm-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/rocm/pytorch/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.rocm)
.PHONY: rocm-runtime-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION)
rocm-runtime-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,runtimes/rocm-pytorch/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.rocm)
.PHONY: rocm-runtime-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION)
rocm-runtime-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,runtimes/rocm-tensorflow/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.rocm)
####################################### Buildchain for Baseline Images (Codeserver, Jupyter, Runtime) using PYPI #######################################
.PHONY: jupyter-baseline-ubi9-python-$(RELEASE_PYTHON_VERSION)
jupyter-baseline-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,jupyter/baseline/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
.PHONY: codeserver-baseline-ubi9-python-$(RELEASE_PYTHON_VERSION)
codeserver-baseline-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,codeserver-baseline/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
.PHONY: runtime-baseline-ubi9-python-$(RELEASE_PYTHON_VERSION)
runtime-baseline-ubi9-python-$(RELEASE_PYTHON_VERSION):
$(call image,$@,runtimes/baseline/ubi9-python-$(RELEASE_PYTHON_VERSION)/Dockerfile.konflux.cpu)
####################################### Deployments #######################################
# Download kubectl binary
.PHONY: bin/kubectl
bin/kubectl:
ifeq (,$(wildcard $(KUBECTL_BIN)))
@mkdir -p bin
@curl -sSL https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/$(OS_ARCH)/kubectl > \
$(KUBECTL_BIN)
@chmod +x $(KUBECTL_BIN)
endif
# Download yq binary
.PHONY: bin/yq
bin/yq:
$(eval YQ_RELEASE_FILE := yq_$(subst /,_,$(OS_ARCH)))
ifeq (,$(wildcard $(YQ_BIN)))
@mkdir -p bin
@curl -sSL https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_RELEASE_FILE} > \
$(YQ_BIN)
@chmod +x $(YQ_BIN)
endif
target_and_python_from_stem = $(subst -ubi9-python-, ,$1)
target_from_stem = $(word 1,$(call target_and_python_from_stem,$1))
python_version_from_stem = $(word 2,$(call target_and_python_from_stem,$1))
.PHONY: deploy9
deploy9-%: bin/kubectl bin/yq
$(eval TARGET := $(call target_from_stem,$*))
$(eval PYTHON_VERSION := $(call python_version_from_stem,$*))
$(eval TARGET_PATH := $(if $(filter codeserver-baseline,$(TARGET)),codeserver-baseline,$(subst -,/,$(subst cuda-,,$(TARGET)))))
$(eval NOTEBOOK_DIR := $(TARGET_PATH)/ubi9-python-$(PYTHON_VERSION)/kustomize/base)
ifndef NOTEBOOK_TAG
$(eval NOTEBOOK_TAG := $*-$(IMAGE_TAG))
endif
$(info # Deploying notebook from $(NOTEBOOK_DIR) directory...)
@arg=$(IMAGE_REGISTRY) $(YQ_BIN) e -i '.images[].newName = strenv(arg)' $(NOTEBOOK_DIR)/kustomization.yaml
@arg=$(NOTEBOOK_TAG) $(YQ_BIN) e -i '.images[].newTag = strenv(arg)' $(NOTEBOOK_DIR)/kustomization.yaml
$(KUBECTL_BIN) apply -k $(NOTEBOOK_DIR)
.PHONY: undeploy9
undeploy9-%: bin/kubectl
$(eval TARGET := $(call target_from_stem,$*))
$(eval PYTHON_VERSION := $(call python_version_from_stem,$*))
$(eval TARGET_PATH := $(if $(filter codeserver-baseline,$(TARGET)),codeserver-baseline,$(subst -,/,$(subst cuda-,,$(TARGET)))))
$(eval NOTEBOOK_DIR := $(TARGET_PATH)/ubi9-python-$(PYTHON_VERSION)/kustomize/base)
$(info # Undeploying notebook from $(NOTEBOOK_DIR) directory...)
$(KUBECTL_BIN) delete -k $(NOTEBOOK_DIR)
.PHONY: deploy-c9s
deploy-c9s-%: bin/kubectl bin/yq
$(eval TARGET := $(shell echo $* | sed 's/-c9s-python.*//'))
$(eval PYTHON_VERSION := $(shell echo $* | sed 's/.*-python-//'))
$(eval NOTEBOOK_DIR := $(subst -,/,$(subst cuda-,,$(TARGET)))/c9s-python-$(PYTHON_VERSION)/kustomize/base)
ifndef NOTEBOOK_TAG
$(eval NOTEBOOK_TAG := $*-$(IMAGE_TAG))
endif
$(info # Deploying notebook from $(NOTEBOOK_DIR) directory...)
@arg=$(IMAGE_REGISTRY) $(YQ_BIN) e -i '.images[].newName = strenv(arg)' $(NOTEBOOK_DIR)/kustomization.yaml
@arg=$(NOTEBOOK_TAG) $(YQ_BIN) e -i '.images[].newTag = strenv(arg)' $(NOTEBOOK_DIR)/kustomization.yaml
$(KUBECTL_BIN) apply -k $(NOTEBOOK_DIR)
.PHONY: undeploy-c9s
undeploy-c9s-%: bin/kubectl
$(eval TARGET := $(shell echo $* | sed 's/-c9s-python.*//'))
$(eval PYTHON_VERSION := $(shell echo $* | sed 's/.*-python-//'))
$(eval NOTEBOOK_DIR := $(subst -,/,$(subst cuda-,,$(TARGET)))/c9s-python-$(PYTHON_VERSION)/kustomize/base)
$(info # Undeploying notebook from $(NOTEBOOK_DIR) directory...)
$(KUBECTL_BIN) delete -k $(NOTEBOOK_DIR)
.PHONY: deploy-rhel9
deploy-rhel9-%: bin/kubectl bin/yq
$(eval TARGET := $(shell echo $* | sed 's/-rhel9-python.*//'))
$(eval PYTHON_VERSION := $(shell echo $* | sed 's/.*-python-//'))
$(eval NOTEBOOK_DIR := $(subst -,/,$(subst cuda-,,$(TARGET)))/rhel9-python-$(PYTHON_VERSION)/kustomize/base)
ifndef NOTEBOOK_TAG
$(eval NOTEBOOK_TAG := $*-$(IMAGE_TAG))
endif
$(info # Deploying notebook from $(NOTEBOOK_DIR) directory...)
@arg=$(IMAGE_REGISTRY) $(YQ_BIN) e -i '.images[].newName = strenv(arg)' $(NOTEBOOK_DIR)/kustomization.yaml
@arg=$(NOTEBOOK_TAG) $(YQ_BIN) e -i '.images[].newTag = strenv(arg)' $(NOTEBOOK_DIR)/kustomization.yaml
$(KUBECTL_BIN) apply -k $(NOTEBOOK_DIR)
.PHONY: undeploy-rhel9
undeploy-rhel9-%: bin/kubectl
$(eval TARGET := $(shell echo $* | sed 's/-rhel9-python.*//'))
$(eval PYTHON_VERSION := $(shell echo $* | sed 's/.*-python-//'))
$(eval NOTEBOOK_DIR := $(subst -,/,$(subst cuda-,,$(TARGET)))/rhel9-python-$(PYTHON_VERSION)/kustomize/base)
$(info # Undeploying notebook from $(NOTEBOOK_DIR) directory...)
$(KUBECTL_BIN) delete -k $(NOTEBOOK_DIR)
# Verify the notebook's readiness by pinging the /api endpoint and executing the corresponding test_notebook.ipynb file in accordance with the build chain logic.
.PHONY: test
test-%: bin/kubectl
$(info # Running tests for $* notebook...)
@./scripts/test_jupyter_with_papermill.sh $*
# Validate that runtime image meets minimum criteria
# This validation is created from subset of https://github.com/elyra-ai/elyra/blob/9c417d2adc9d9f972de5f98fd37f6945e0357ab9/Makefile#L325
# Elyra pins are applied from ci/requirements-elyra.txt (kubectl cp) so CI stays reproducible when PyPI drops a pin.
.PHONY: validate-runtime-image
validate-runtime-image: bin/kubectl
$(eval NOTEBOOK_NAME := $(subst .,-,$(subst cuda-,,$*)))
$(info # Running tests for $(NOTEBOOK_NAME) runtime...)
$(KUBECTL_BIN) wait --for=condition=ready pod runtime-pod --timeout=300s
@required_commands=$(REQUIRED_RUNTIME_IMAGE_COMMANDS)
fail=0
if [[ $$image == "" ]] ; then
echo "Usage: make validate-runtime-image image=<container-image-name>"
exit 1
fi
for cmd in $$required_commands ; do
echo "=> Checking container image $$image for $$cmd..."
if ! $(KUBECTL_BIN) exec runtime-pod which $$cmd > /dev/null 2>&1 ; then
echo "ERROR: Container image $$image does not meet criteria for command: $$cmd"
fail=1
continue
fi
if [ $$cmd == "python3" ]; then
echo "=> Checking notebook execution..."
if ! $(KUBECTL_BIN) cp "$(CURDIR)/ci/requirements-elyra.txt" runtime-pod:/tmp/requirements-elyra.txt || \
! $(KUBECTL_BIN) exec runtime-pod -- /bin/sh -c "python3 -m pip install -r /tmp/requirements-elyra.txt > /dev/null && \
python3 -m papermill \$$(python3 -c \"import papermill, pathlib; print(pathlib.Path(papermill.__file__).parent / 'tests/notebooks/simple_execute.ipynb')\") /tmp/output.ipynb > /dev/null" ; then
echo "ERROR: Image does not meet Python requirements criteria in pipfile"
fail=1
fi
fi
done
if [ $$fail -eq 1 ]; then
echo "=> ERROR: Container image $$image is not a suitable Elyra runtime image"
exit 1
else
echo "=> Container image $$image is a suitable Elyra runtime image"
fi;
.PHONY: validate-codeserver-image
validate-codeserver-image: bin/kubectl
$(eval NOTEBOOK_NAME := $(subst .,-,$(subst cuda-,,$*)))
$(info # Running tests for $(NOTEBOOK_NAME) code-server image...)
$(KUBECTL_BIN) wait --for=condition=ready pod codeserver-pod --timeout=300s
@required_commands=$(REQUIRED_CODE_SERVER_IMAGE_COMMANDS)
if [[ $$image == "" ]] ; then
echo "Usage: make validate-codeserver-image image=<container-image-name>"
exit 1
fi
for cmd in $$required_commands ; do
echo "=> Checking container image $$image for $$cmd..."
if ! $(KUBECTL_BIN) exec codeserver-pod which $$cmd > /dev/null 2>&1 ; then
echo "ERROR: Container image $$image does not meet criteria for command: $$cmd"
fail=1
continue
fi
done
# ======================================================================================
# Refresh lock files
# Usage examples:
# gmake refresh-lock-files <- auto mode (rh-index if uv.lock.d/ exists, else public-index)
# gmake refresh-lock-files INDEX_MODE=public-index <- force public-index
# gmake refresh-lock-files INDEX_MODE=public-index DIR=jupyter/minimal/ubi9-python-3.12
# Optional: UV_EXTRA_INDEX_URL / PIP_EXTRA_INDEX_URL (e.g. RH CUDA *-test/simple/) are
# forwarded to the lock generator as UV_LOCK_* / PIP_LOCK_* only, then unset so
# `uv run` at the repo root is not affected (see scripts/pylocks_generator.py).
# ======================================================================================
DIR ?=
.PHONY: refresh-lock-files
refresh-lock-files:
@echo "==================================================================="
@echo "🔁 Refreshing lock files using INDEX_MODE=$(INDEX_MODE)"
@echo " (orchestrator: uv run; pip compile inside pylocks_generator: ./uv → dependencies/uv-image-lock-version)"
@echo "==================================================================="
@cd $(ROOT_DIR) && \
export UV_LOCK_EXTRA_INDEX_URL="$(UV_EXTRA_INDEX_URL)" && \
export PIP_LOCK_EXTRA_INDEX_URL="$(PIP_EXTRA_INDEX_URL)" && \
unset UV_EXTRA_INDEX_URL PIP_EXTRA_INDEX_URL && \
uv run scripts/pylocks_generator.py "$(INDEX_MODE)" $(DIR)
# ======================================================================================
# Sync build-args BASE_IMAGE values from versions_config.yml
# Usage examples:
# gmake sync-build-args-from-versions
# gmake sync-build-args-from-versions SYNC_BUILD_ARGS_ARGS=--check
# gmake sync-build-args-from-versions SYNC_BUILD_ARGS_ARGS=--dry-run
# gmake sync-build-args-from-versions SYNC_BUILD_ARGS_ARGS=--rhds-stable-repo-override=cuda=quay.io/<org>/cuda-stable
# Prerequisites:
# - skopeo on PATH (RHDS tag resolution uses skopeo list-tags)
# - Registry access for quay.io/aipcc/base-images when syncing RHDS build args
# ======================================================================================
SYNC_BUILD_ARGS_ARGS ?=
SYNC_BUILD_ARGS_ALLOWED := --dry-run --check --rhds-stable-repo-override=%
SYNC_BUILD_ARGS_INVALID := $(strip $(filter-out $(SYNC_BUILD_ARGS_ALLOWED),$(value SYNC_BUILD_ARGS_ARGS)))
.PHONY: sync-build-args-from-versions
sync-build-args-from-versions:
$(if $(SYNC_BUILD_ARGS_INVALID),$(error Invalid SYNC_BUILD_ARGS_ARGS token(s): $(SYNC_BUILD_ARGS_INVALID) (allowed: $(SYNC_BUILD_ARGS_ALLOWED))))
@echo "==================================================================="
@echo "🔁 Syncing build-args BASE_IMAGE values from versions_config.yml"
@echo "==================================================================="
@cd "$(ROOT_DIR)" && ./uv run scripts/update_build_args_from_versions.py $(value SYNC_BUILD_ARGS_ARGS)
# ======================================================================================
# Kick off release updates in one command
# Usage:
# gmake kickoff-release SUBSCRIPTION_ACTIVATION_KEY=<key> SUBSCRIPTION_ORG=<org>
# gmake kickoff-release KICKOFF_START_STEP=5 SUBSCRIPTION_ACTIVATION_KEY=<key> SUBSCRIPTION_ORG=<org>
# gmake kickoff-release KICKOFF_START_STEP=auto SUBSCRIPTION_ACTIVATION_KEY=<key> SUBSCRIPTION_ORG=<org>
# Step index:
# 1=sync-build-args-from-versions
# 2=refresh-lock-files (with FORCE_LOCKFILES_UPGRADE=1)
# 3=create ODH rpm lockfile (root prefetch input)
# 4=create ODH rpm lockfile (codeserver prefetch input)
# 5=create RHDS rpm lockfile (root prefetch input)
# 6=create RHDS rpm lockfile (codeserver prefetch input)
# 7=rollout tags on imagestreams
# 8=validate manifests (make test)
# Notes:
# - KICKOFF_START_STEP=auto (default) resumes from .kickoff-release.state when present
# - After a successful full run, the state file is removed
# ======================================================================================
KICKOFF_START_STEP ?= auto
KICKOFF_STATE_FILE ?= $(ROOT_DIR).kickoff-release.state
.PHONY: clean-rpm-lockfile-cache
clean-rpm-lockfile-cache:
@echo "🧹 Removing cached RPM lockfile generator image (if present)"
@$(CONTAINER_ENGINE) image rm -f localhost/notebook-rpm-lockfile:latest >/dev/null 2>&1 || true
.PHONY: kickoff-release
kickoff-release:
@echo "==================================================================="
@echo "🚀 Starting release kickoff sequence"
@echo "==================================================================="
@# Disable xtrace for this recipe to avoid leaking subscription values in logs.
@set +x
@start_step="$(KICKOFF_START_STEP)"; \
state_file="$(KICKOFF_STATE_FILE)"; \
if [[ "$$start_step" == "auto" ]]; then \
if [[ -f "$$state_file" ]]; then \
start_step="$$(tr -d '[:space:]' < "$$state_file")"; \
else \
start_step="1"; \
fi; \
fi; \
if [[ ! "$$start_step" =~ ^[1-8]$$ ]]; then \
echo "ERROR: KICKOFF_START_STEP must be auto or an integer from 1 to 8 (got: $(KICKOFF_START_STEP))."; \
echo "If resuming automatically, delete an invalid state file and retry:"; \
echo " rm -f $$(printf '%q' "$$state_file")"; \
exit 1; \
fi; \
if (( start_step <= 6 )) && [[ -z "$${SUBSCRIPTION_ACTIVATION_KEY:-}" || -z "$${SUBSCRIPTION_ORG:-}" ]]; then \
echo "ERROR: SUBSCRIPTION_ACTIVATION_KEY and SUBSCRIPTION_ORG must be set before running kickoff-release."; \
echo "Example:"; \
echo " SUBSCRIPTION_ACTIVATION_KEY=<key> SUBSCRIPTION_ORG=<org> gmake kickoff-release"; \
exit 1; \
fi; \
if (( start_step <= 6 )); then \
echo "✅ Required subscription environment variables are set."; \
fi; \
echo "▶️ Running from KICKOFF_START_STEP=$$start_step"
@record_step_completion() { \
local step="$$1"; \
if (( step < 8 )); then \
echo "$$((step + 1))" > "$$state_file"; \
else \
rm -f "$$state_file"; \
fi; \
}; \
run_step() { \
local step="$$1"; \
local desc="$$2"; \
shift 2; \
if (( start_step <= step )); then \
echo "➡️ [$$step/8] $$desc"; \
"$$@"; \
record_step_completion "$$step"; \
else \
echo "⏭️ [$$step/8] Skipping $$desc"; \
fi; \
}; \
last_rpm_flavor=""; \
run_rpm_step() { \
local flavor="$$1"; \
local step="$$2"; \
local desc="$$3"; \
shift 3; \
if (( start_step <= step )); then \
if [[ "$$last_rpm_flavor" != "$$flavor" ]]; then \
echo "🧹 Clearing RPM lockfile generator cache for '$$flavor' inputs"; \
$(MAKE) clean-rpm-lockfile-cache; \
last_rpm_flavor="$$flavor"; \
fi; \
echo "➡️ [$$step/8] $$desc"; \
"$$@"; \
record_step_completion "$$step"; \
else \
echo "⏭️ [$$step/8] Skipping $$desc"; \
fi; \
}; \
run_step 1 "sync-build-args-from-versions" $(MAKE) sync-build-args-from-versions; \
run_step 2 "refresh-lock-files" env FORCE_LOCKFILES_UPGRADE=1 $(MAKE) refresh-lock-files; \
run_rpm_step odh 3 "create ODH rpm lockfile (root prefetch input)" env -u SUBSCRIPTION_ACTIVATION_KEY -u SUBSCRIPTION_ORG ./scripts/lockfile-generators/create-rpm-lockfile.sh --rpm-input prefetch-input/odh/rpms.in.yaml; \
run_rpm_step odh 4 "create ODH rpm lockfile (codeserver prefetch input)" env -u SUBSCRIPTION_ACTIVATION_KEY -u SUBSCRIPTION_ORG ./scripts/lockfile-generators/create-rpm-lockfile.sh --rpm-input codeserver/ubi9-python-3.12/prefetch-input/odh/rpms.in.yaml; \
run_rpm_step rhds 5 "create RHDS rpm lockfile (root prefetch input)" ./scripts/lockfile-generators/create-rpm-lockfile.sh --rpm-input prefetch-input/rhds/rpms.in.yaml; \
run_rpm_step rhds 6 "create RHDS rpm lockfile (codeserver prefetch input)" ./scripts/lockfile-generators/create-rpm-lockfile.sh --rpm-input codeserver/ubi9-python-3.12/prefetch-input/rhds/rpms.in.yaml; \
run_step 7 "rollout tags on imagestreams" uv run manifests/tools/rollout_tag_on_imagestreams.py; \
run_step 8 "validate manifests (make test)" $(MAKE) test
# ======================================================================================
# gmake update-imagestream-annotations
# gmake update-imagestream-annotations IMAGESTREAM_VARIANT=rhoai DRY_RUN=1
# Prerequisites:
# - uv sync --locked (or make setup) so scripts run in the project venv
# - skopeo on PATH (sync-commit-env-files inspects images from params*.env)
# - For private registry pulls: mkdir -p ~/.config/containers &&
# cp ci/secrets/pull-secret.json ~/.config/containers/auth.json
# - Full clone / fetch-depth 0 helps update-imagestream-annotations when git show needs SHAs
# not already in the local object database (script can fetch from GitHub when needed).
# ======================================================================================
IMAGESTREAM_VARIANT ?=
DRY_RUN ?=
.PHONY: update-imagestream-annotations
update-imagestream-annotations:
@echo "==================================================================="
@echo "📋 Refreshing ImageStream notebook dependency annotations (IMAGESTREAM_VARIANT=$(or $(IMAGESTREAM_VARIANT),odh+rhoai))"
@echo "==================================================================="
@cd $(ROOT_DIR) && \
if [[ -n "$(IMAGESTREAM_VARIANT)" ]]; then \
uv run python manifests/tools/update_imagestream_annotations_from_pylock.py \
--variant "$(IMAGESTREAM_VARIANT)" $(if $(filter 1 true yes,$(DRY_RUN)),--dry-run,); \
else \
uv run python manifests/tools/update_imagestream_annotations_from_pylock.py --variant odh \
$(if $(filter 1 true yes,$(DRY_RUN)),--dry-run,) && \
uv run python manifests/tools/update_imagestream_annotations_from_pylock.py --variant rhoai \
$(if $(filter 1 true yes,$(DRY_RUN)),--dry-run,); \
fi
# This is only for the workflow action
# For running manually, set the required environment variables
.PHONY: scan-image-vulnerabilities
scan-image-vulnerabilities:
python ci/security-scan/quay_security_analysis.py
.PHONY: trivy-scan
TRIVY_CACHE_DIR ?= $(shell pwd)/../.trivy-cache
trivy-scan:
@echo "🔍 Running Trivy filesystem vulnerability scan using trivy.yaml"
@mkdir -p "$(TRIVY_CACHE_DIR)"
$(CONTAINER_ENGINE) run --rm \
-v "$(shell pwd):/workspace:ro,Z" \
-v "$(TRIVY_CACHE_DIR):/root/.cache/trivy:Z" \
docker.io/aquasec/trivy:0.74.0 \
fs --config /workspace/trivy.yaml /workspace
# This is used primarily for gen_gha_matrix_jobs.py to we know the set of all possible images we may want to build
.PHONY: all-images
ifeq ($(RELEASE_PYTHON_VERSION), 3.12)
all-images: \
jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
jupyter-datascience-ubi9-python-$(RELEASE_PYTHON_VERSION) \
jupyter-universal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
cuda-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
cuda-jupyter-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION) \
cuda-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
cuda-jupyter-pytorch-llmcompressor-ubi9-python-$(RELEASE_PYTHON_VERSION) \
codeserver-ubi9-python-$(RELEASE_PYTHON_VERSION) \
che-code-codeserver-ubi9-python-$(RELEASE_PYTHON_VERSION) \
jupyter-trustyai-ubi9-python-$(RELEASE_PYTHON_VERSION) \
runtime-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
runtime-datascience-ubi9-python-$(RELEASE_PYTHON_VERSION) \
runtime-cuda-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
runtime-cuda-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION) \
runtime-cuda-pytorch-llmcompressor-ubi9-python-$(RELEASE_PYTHON_VERSION) \
rocm-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
rocm-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
rocm-runtime-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
rocm-runtime-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION) \
rocm-jupyter-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION) \
jupyter-baseline-ubi9-python-$(RELEASE_PYTHON_VERSION) \
codeserver-baseline-ubi9-python-$(RELEASE_PYTHON_VERSION) \
runtime-baseline-ubi9-python-$(RELEASE_PYTHON_VERSION)
else
$(error Invalid Python version $(RELEASE_PYTHON_VERSION))
endif
# This is used primarily for `konflux_generate_component_build_pipelines.py` to we know the build release version
.PHONY: print-release
print-release:
@echo "$(RELEASE)"
.PHONY: setup
setup:
uv sync --locked
.PHONY: validate-renovate-config
validate-renovate-config:
@echo "Validating .github/renovate.json5 semantics"
./uv run python scripts/ci/validate_renovate_config.py
.PHONY: test
test:
@echo "Running quick static tests"
uv run pytest -m 'not buildonlytest'
.PHONY: check-actions
check-actions:
@echo "Checking GitHub Actions SHA pinning"
@set +x; GITHUB_TOKEN=$$(gh auth token) pinact run --check --verify
.PHONY: test-unit
test-unit:
@echo "Running Python unit tests"
uv sync --locked --all-packages
uv run pytest -m 'not buildonlytest' --ignore=tests/containers tests/ ntb/ ci/agentic-reviewer/tests/
@echo "Running Go unit tests"
GOTOOLCHAIN=auto GONOSUMDB=golang.org/toolchain \
go test -C scripts/buildinputs -cover ./...
.PHONY: test-crosshair
test-crosshair:
@echo "Running Hypothesis property tests with CrossHair SMT backend"
uv sync --locked --group crosshair
uv run pytest tests/unit/test_property_helpers.py --hypothesis-profile=crosshair -m 'not buildonlytest' --no-cov
PYTEST_ARGS ?=
.PHONY: test-integration
test-integration:
ifeq ($(PYTEST_ARGS),)
$(error Usage: make test-integration PYTEST_ARGS="--image=<image>")
endif
@echo "Running container integration tests"
uv run pytest tests/containers -m 'not openshift and not cuda and not rocm and not manifest_validation' $(PYTEST_ARGS)
.PHONY: unit-test integration-test
unit-test: test-unit
integration-test: test-integration