Skip to content

Commit c42cf0a

Browse files
authored
Merge pull request opendatahub-io#81 from moulalis/training-cuda
onbording training cuda
2 parents f0268cf + 45d78df commit c42cf0a

File tree

2 files changed

+51
-8
lines changed

2 files changed

+51
-8
lines changed

.tekton/training-cuda-pull-request.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ metadata:
77
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
88
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
99
pipelinesascode.tekton.dev/max-keep-runs: "3"
10-
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
11-
== "main" && ( "/images/runtime/training /cuda/***".pathChanged() || ".tekton/training-cuda-pull-request.yaml".pathChanged()
12-
|| "Dockerfile".pathChanged() )
10+
pipelinesascode.tekton.dev/on-cel-expression: |
11+
event == "pull_request"
12+
&& target_branch == "main"
13+
&& ( "images/runtime/training/cuda/**".pathChanged() || ".tekton/training-cuda-pull-request.yaml".pathChanged() )
1314
creationTimestamp: null
1415
labels:
1516
appstudio.openshift.io/application: training
@@ -30,7 +31,23 @@ spec:
3031
- name: dockerfile
3132
value: Dockerfile
3233
- name: path-context
33-
value: images/runtime/training /cuda
34+
value: images/runtime/training/cuda
35+
taskRunSpecs:
36+
- pipelineTaskName: build-container
37+
stepSpecs:
38+
- name: build
39+
computeResources:
40+
requests:
41+
memory: 10Gi
42+
limits:
43+
memory: 10Gi
44+
- pipelineTaskName: prefetch-dependencies
45+
computeResources:
46+
requests:
47+
cpu: '1'
48+
memory: 2Gi
49+
limits:
50+
memory: 2Gi
3451
pipelineSpec:
3552
description: |
3653
This pipeline is ideal for building container images from a Containerfile while maintaining trust after pipeline customization.

.tekton/training-cuda-push.yaml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ metadata:
66
build.appstudio.redhat.com/commit_sha: '{{revision}}'
77
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
88
pipelinesascode.tekton.dev/max-keep-runs: "3"
9-
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
10-
== "main"
9+
pipelinesascode.tekton.dev/on-cel-expression: |
10+
event == "push"
11+
&& target_branch == "main"
12+
&& ( "images/runtime/training/cuda/**".pathChanged() || ".tekton/training-cuda-push.yaml".pathChanged() )
1113
creationTimestamp: null
1214
labels:
1315
appstudio.openshift.io/application: training
@@ -22,11 +24,29 @@ spec:
2224
- name: revision
2325
value: '{{revision}}'
2426
- name: output-image
25-
value: quay.io/redhat-user-workloads/rhoai-tenant/training-cuda:{{revision}}
27+
value: quay.io/modh/training:py311-cuda121-torch241
28+
- name: additional-tag
29+
value: py311-cuda121-torch241-{{revision}}
2630
- name: dockerfile
2731
value: Dockerfile
2832
- name: path-context
29-
value: images/runtime/training /cuda
33+
value: images/runtime/training/cuda
34+
taskRunSpecs:
35+
- pipelineTaskName: build-container
36+
stepSpecs:
37+
- name: build
38+
computeResources:
39+
requests:
40+
memory: 10Gi
41+
limits:
42+
memory: 10Gi
43+
- pipelineTaskName: prefetch-dependencies
44+
computeResources:
45+
requests:
46+
cpu: '1'
47+
memory: 2Gi
48+
limits:
49+
memory: 2Gi
3050
pipelineSpec:
3151
description: |
3252
This pipeline is ideal for building container images from a Containerfile while maintaining trust after pipeline customization.
@@ -48,6 +68,9 @@ spec:
4868
value: task
4969
resolver: bundles
5070
params:
71+
- name: additional-tag
72+
type: string
73+
description: Additional fixed tag for the image
5174
- description: Source Repository URL
5275
name: git-url
5376
type: string
@@ -404,6 +427,9 @@ spec:
404427
params:
405428
- name: IMAGE
406429
value: $(tasks.build-image-index.results.IMAGE_URL)
430+
- name: ADDITIONAL_TAGS
431+
value:
432+
- "$(params.additional-tag)"
407433
runAfter:
408434
- build-image-index
409435
taskRef:

0 commit comments

Comments
 (0)