Skip to content

Commit c643233

Browse files
authored
Merge pull request opendatahub-io#1521 from atheo89/sync-x2
Sync downstream `main` from upstream
2 parents c43026b + 41b4b85 commit c643233

File tree

65 files changed

+1151
-1410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1151
-1410
lines changed

.tekton/multiarch-push-pipeline.yaml

Lines changed: 652 additions & 0 deletions
Large diffs are not rendered by default.

.tekton/odh-base-image-cuda-py311-c9s-push.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apiVersion: tekton.dev/v1
22
kind: PipelineRun
3+
#test1
34
metadata:
45
annotations:
56
build.appstudio.openshift.io/repo: https://github.com/opendatahub-io/notebooks?rev={{revision}}
@@ -36,7 +37,7 @@ spec:
3637
- '{{target_branch}}-{{revision}}'
3738
- v12.6
3839
pipelineRef:
39-
name: multiarch-pull-request-pipeline
40+
name: multiarch-push-pipeline
4041
taskRunTemplate:
4142
serviceAccountName: build-pipeline-odh-base-image-cuda-py311-c9s-poc
4243
workspaces:

.tekton/odh-base-image-cuda-py312-c9s-push.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: tekton.dev/v1
22
kind: PipelineRun
3+
#test2
34
metadata:
4-
#TEST
55
annotations:
66
build.appstudio.openshift.io/repo: https://github.com/opendatahub-io/notebooks?rev={{revision}}
77
build.appstudio.redhat.com/commit_sha: '{{revision}}'
@@ -37,7 +37,7 @@ spec:
3737
- '{{target_branch}}-{{revision}}'
3838
- v12.6
3939
pipelineRef:
40-
name: multiarch-pull-request-pipeline
40+
name: multiarch-push-pipeline
4141
taskRunTemplate:
4242
serviceAccountName: build-pipeline-odh-base-image-cuda-py312-c9s-poc
4343
workspaces:

.tekton/odh-base-image-cuda-py312-ubi9-push.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: tekton.dev/v1
22
kind: PipelineRun
3-
# test
3+
#test2
44
metadata:
55
annotations:
66
build.appstudio.openshift.io/repo: https://github.com/opendatahub-io/notebooks?rev={{revision}}
@@ -37,7 +37,7 @@ spec:
3737
- '{{target_branch}}-{{revision}}'
3838
- v12.6
3939
pipelineRef:
40-
name: multiarch-pull-request-pipeline
40+
name: multiarch-push-pipeline
4141
taskRunTemplate:
4242
serviceAccountName: build-pipeline-odh-base-image-cuda-py312-ubi9-poc
4343
workspaces:

.tekton/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-ubi9-pull-request.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ metadata:
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
1414
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-pytorch\-llmcompressor\-cuda\-py312\-ubi9|runtimes/pytorch\+llmcompressor/ubi9\-python\-3\.12)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
16-
event == "pull_request" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-ubi9-pull-request.yaml".pathChanged() || "runtimes/pytorch+llmcompressor/ubi9-python-3.12/**".pathChanged() || "cuda/**".pathChanged() )
16+
event == "pull_request" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-ubi9-pull-request.yaml".pathChanged() || "runtimes/pytorch+llmcompressor/ubi9-python-3.12/**".pathChanged() || "runtimes/pytorch+llmcompressor/ubi9-python-3.12/build-args/cuda.conf".pathChanged() )
1717
&& body.repository.full_name == "opendatahub-io/notebooks"
1818
labels:
1919
appstudio.openshift.io/application: opendatahub-release
@@ -40,6 +40,8 @@ spec:
4040
value: runtimes/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.cuda
4141
- name: path-context
4242
value: .
43+
- name: build-args-file
44+
value: runtimes/pytorch+llmcompressor/ubi9-python-3.12/build-args/cuda.conf
4345
pipelineRef:
4446
name: multiarch-pull-request-pipeline
4547
taskRunTemplate:

.tekton/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-ubi9-push.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
apiVersion: tekton.dev/v1
22
kind: PipelineRun
3-
#test
43
metadata:
54
annotations:
65
build.appstudio.openshift.io/repo: https://github.com/opendatahub-io/notebooks?rev={{revision}}
@@ -9,7 +8,7 @@ metadata:
98
pipelinesascode.tekton.dev/cancel-in-progress: "false"
109
pipelinesascode.tekton.dev/max-keep-runs: "3"
1110
build.appstudio.openshift.io/build-nudge-files: "manifests/base/params-latest.env"
12-
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-ubi9-push.yaml".pathChanged() || "runtimes/pytorch+llmcompressor/ubi9-python-3.12/**".pathChanged() || "cuda/**".pathChanged() )
11+
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-ubi9-push.yaml".pathChanged() || "runtimes/pytorch+llmcompressor/ubi9-python-3.12/**".pathChanged() || "runtimes/pytorch+llmcompressor/ubi9-python-3.12/build-args/cuda.conf".pathChanged() )
1312
creationTimestamp:
1413
labels:
1514
appstudio.openshift.io/application: opendatahub-release
@@ -29,6 +28,8 @@ spec:
2928
value: quay.io/opendatahub/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-ubi9:{{revision}}
3029
- name: dockerfile
3130
value: runtimes/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.cuda
31+
- name: build-args-file
32+
value: runtimes/pytorch+llmcompressor/ubi9-python-3.12/build-args/cuda.conf
3233
- name: path-context
3334
value: .
3435
- name: additional-tags

.tekton/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-ubi9-pull-request.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ metadata:
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
1414
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-workbench\-jupyter\-pytorch\-llmcompressor\-cuda\-py312\-ubi9|jupyter/pytorch\+llmcompressor/ubi9\-python\-3\.12)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
16-
event == "pull_request" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-ubi9-pull-request.yaml".pathChanged() || "jupyter/pytorch+llmcompressor/ubi9-python-3.12/**".pathChanged() || "cuda/**".pathChanged() || "jupyter/utils/**".pathChanged() || "jupyter/minimal/ubi9-python-3.12/start-notebook.sh".pathChanged() || "jupyter/datascience/ubi9-python-3.12/mongodb-org-6.0.repo-x86_64/**".pathChanged() || "jupyter/datascience/ubi9-python-3.12/mssql-2022.repo-x86_64/**".pathChanged() || "jupyter/datascience/ubi9-python-3.12/setup-elyra.sh".pathChanged() )
16+
event == "pull_request" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-ubi9-pull-request.yaml".pathChanged() || "jupyter/pytorch+llmcompressor/ubi9-python-3.12/**".pathChanged() || "jupyter/pytorch+llmcompressor/ubi9-python-3.12/build-args/cuda.conf".pathChanged() || "jupyter/utils/**".pathChanged() || "jupyter/minimal/ubi9-python-3.12/start-notebook.sh".pathChanged() || "jupyter/datascience/ubi9-python-3.12/mongodb-org-6.0.repo-x86_64/**".pathChanged() || "jupyter/datascience/ubi9-python-3.12/mssql-2022.repo-x86_64/**".pathChanged() || "jupyter/datascience/ubi9-python-3.12/setup-elyra.sh".pathChanged() )
1717
&& body.repository.full_name == "opendatahub-io/notebooks"
1818
labels:
1919
appstudio.openshift.io/application: opendatahub-release
@@ -40,6 +40,8 @@ spec:
4040
value: jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.cuda
4141
- name: path-context
4242
value: .
43+
- name: build-args-file
44+
value: jupyter/pytorch+llmcompressor/ubi9-python-3.12/build-args/cuda.conf
4345
pipelineRef:
4446
name: multiarch-pull-request-pipeline
4547
taskRunTemplate:

.tekton/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-ubi9-push.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
pipelinesascode.tekton.dev/cancel-in-progress: "false"
99
pipelinesascode.tekton.dev/max-keep-runs: "3"
1010
build.appstudio.openshift.io/build-nudge-files: "manifests/base/params-latest.env"
11-
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-ubi9-push.yaml".pathChanged() || "jupyter/pytorch+llmcompressor/ubi9-python-3.12/**".pathChanged() || "cuda/**".pathChanged() || "jupyter/utils/**".pathChanged() || "jupyter/minimal/ubi9-python-3.12/start-notebook.sh".pathChanged() || "jupyter/datascience/ubi9-python-3.12/mongodb-org-6.0.repo-x86_64/**".pathChanged() || "jupyter/datascience/ubi9-python-3.12/mssql-2022.repo-x86_64/**".pathChanged() || "jupyter/datascience/ubi9-python-3.12/setup-elyra.sh".pathChanged() )
11+
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-ubi9-push.yaml".pathChanged() || "jupyter/pytorch+llmcompressor/ubi9-python-3.12/**".pathChanged() || "jupyter/pytorch+llmcompressor/ubi9-python-3.12/build-args/cuda.conf".pathChanged() || "jupyter/utils/**".pathChanged() || "jupyter/minimal/ubi9-python-3.12/start-notebook.sh".pathChanged() || "jupyter/datascience/ubi9-python-3.12/mongodb-org-6.0.repo-x86_64/**".pathChanged() || "jupyter/datascience/ubi9-python-3.12/mssql-2022.repo-x86_64/**".pathChanged() || "jupyter/datascience/ubi9-python-3.12/setup-elyra.sh".pathChanged() )
1212
creationTimestamp:
1313
labels:
1414
appstudio.openshift.io/application: opendatahub-release
@@ -26,6 +26,8 @@ spec:
2626
value: quay.io/opendatahub/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-ubi9:{{revision}}
2727
- name: dockerfile
2828
value: jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.cuda
29+
- name: build-args-file
30+
value: jupyter/pytorch+llmcompressor/ubi9-python-3.12/build-args/cuda.conf
2931
- name: path-context
3032
value: .
3133
- name: additional-tags

Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,20 @@ endif
6767
# ARG 2: Path of Dockerfile we want to build.
6868
define build_image
6969
$(eval IMAGE_NAME := $(IMAGE_REGISTRY):$(1)-$(IMAGE_TAG))
70-
$(eval BUILD_ARGS :=)
7170

72-
$(info # Building $(IMAGE_NAME) image...)
71+
# Checks if there’s a build-args/*.conf matching the Dockerfile
72+
$(eval BUILD_DIR := $(dir $(2)))
73+
$(eval DOCKERFILE_NAME := $(notdir $(2)))
74+
$(eval CONF_FILE := $(BUILD_DIR)build-args/$(shell echo $(DOCKERFILE_NAME) | cut -d. -f2).conf)
75+
76+
# if the conf file exists, transform it into --build-arg KEY=VALUE flags
77+
$(eval BUILD_ARGS := $(shell if [ -f $(CONF_FILE) ]; then \
78+
while IFS='=' read -r k v; do \
79+
[ -n "$$k" ] && printf -- "--build-arg %s=%s " "$$k" "$$v"; \
80+
done < $(CONF_FILE); \
81+
fi))
82+
83+
$(info # Building $(IMAGE_NAME) using $(DOCKERFILE_NAME) with $(CONF_FILE) and $(BUILD_ARGS)...)
7384

7485
$(ROOT_DIR)/scripts/sandbox.py --dockerfile '$(2)' --platform '$(BUILD_ARCH)' -- \
7586
$(CONTAINER_ENGINE) build $(CONTAINER_BUILD_CACHE_ARGS) --platform=$(BUILD_ARCH) --label release=$(RELEASE) --tag $(IMAGE_NAME) --file '$(2)' $(BUILD_ARGS) {}\;

base-images/cuda/12.6/c9s-python-3.11/Dockerfile.cuda

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ RUN NVIDIA_GPGKEY_SUM=d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3
3737
ENV CUDA_VERSION=12.6.3
3838

3939
# For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a
40-
RUN yum upgrade -y && yum install -y \
40+
RUN dnf upgrade -y && dnf install -y \
4141
cuda-cudart-12-6-${NV_CUDA_CUDART_VERSION} \
4242
cuda-compat-12-6 \
43-
&& yum clean all \
43+
&& dnf clean all \
4444
&& rm -rf /var/cache/yum/*
4545

4646
# nvidia-docker 1.0
@@ -67,20 +67,20 @@ ENV NV_LIBNCCL_VERSION=2.23.4
6767
ENV NCCL_VERSION=2.23.4
6868
ENV NV_LIBNCCL_PACKAGE=${NV_LIBNCCL_PACKAGE_NAME}-${NV_LIBNCCL_PACKAGE_VERSION}+cuda12.6
6969

70-
RUN yum install -y \
70+
RUN dnf install -y \
7171
cuda-libraries-12-6-${NV_CUDA_LIB_VERSION} \
7272
cuda-nvtx-12-6-${NV_NVTX_VERSION} \
7373
${NV_LIBNPP_PACKAGE} \
7474
libcublas-12-6-${NV_LIBCUBLAS_VERSION} \
7575
${NV_LIBNCCL_PACKAGE} \
76-
&& yum clean all \
76+
&& dnf clean all \
7777
&& rm -rf /var/cache/yum/*
7878

7979
# Install devel tools
80-
RUN yum install -y \
80+
RUN dnf install -y \
8181
make \
8282
findutils \
83-
&& yum clean all \
83+
&& dnf clean all \
8484
&& rm -rf /var/cache/yum/*
8585

8686
# Install CUDA cudnn9 from:
@@ -90,17 +90,17 @@ ENV NV_CUDNN_PACKAGE=libcudnn9-cuda-12-${NV_CUDNN_VERSION}
9090

9191
LABEL com.nvidia.cudnn.version="${NV_CUDNN_VERSION}"
9292

93-
RUN yum install -y \
93+
RUN dnf install -y \
9494
${NV_CUDNN_PACKAGE} \
95-
&& yum clean all \
95+
&& dnf clean all \
9696
&& rm -rf /var/cache/yum/*
9797

9898
# Set this flag so that libraries can find the location of CUDA
9999
ENV XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/local/cuda
100100

101101
# Install CUDA toolkit 12.6
102-
RUN yum -y install cuda-toolkit-12-6 && \
103-
yum -y clean all --enablerepo="*"
102+
RUN dnf -y install cuda-toolkit-12-6 && \
103+
dnf -y clean all --enablerepo="*"
104104

105105
# Restore user workspace
106106
USER 1001

0 commit comments

Comments
 (0)