@@ -23,11 +23,21 @@ import (
23
23
)
24
24
25
25
const (
26
- volumeNameKFPLauncher = "kfp-launcher"
27
- DefaultLauncherImage = "gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4"
28
- LauncherImageEnvVar = "V2_LAUNCHER_IMAGE"
29
- DefaultDriverImage = "gcr.io/ml-pipeline/kfp-driver@sha256:8e60086b04d92b657898a310ca9757631d58547e76bbbb8bfc376d654bef1707"
30
- DriverImageEnvVar = "V2_DRIVER_IMAGE"
26
+ volumeNameKFPLauncher = "kfp-launcher"
27
+ DefaultLauncherImage = "gcr.io/ml-pipeline/kfp-launcher@sha256:80cf120abd125db84fa547640fd6386c4b2a26936e0c2b04a7d3634991a850a4"
28
+ LauncherImageEnvVar = "V2_LAUNCHER_IMAGE"
29
+ DefaultDriverImage = "gcr.io/ml-pipeline/kfp-driver@sha256:8e60086b04d92b657898a310ca9757631d58547e76bbbb8bfc376d654bef1707"
30
+ DriverImageEnvVar = "V2_DRIVER_IMAGE"
31
+ gcsScratchLocation = "/gcs"
32
+ gcsScratchName = "gcs-scratch"
33
+ s3ScratchLocation = "/s3"
34
+ s3ScratchName = "s3-scratch"
35
+ minioScratchLocation = "/minio"
36
+ minioScratchName = "minio-scratch"
37
+ dotLocalScratchLocation = "/.local"
38
+ dotLocalScratchName = "dot-local-scratch"
39
+ dotCacheScratchLocation = "/.cache"
40
+ dotCacheScratchName = "dot-cache-scratch"
31
41
)
32
42
33
43
func (c * workflowCompiler ) Container (name string , component * pipelinespec.ComponentSpec , container * pipelinespec.PipelineDeploymentConfig_PipelineContainerSpec ) error {
@@ -238,21 +248,55 @@ func (c *workflowCompiler) addContainerExecutorTemplate() string {
238
248
// args come from. It is treated as a strategic merge patch on
239
249
// top of the Pod spec.
240
250
PodSpecPatch : inputValue (paramPodSpecPatch ),
241
- Volumes : []k8score.Volume {{
242
- Name : volumeNameKFPLauncher ,
243
- VolumeSource : k8score.VolumeSource {
244
- EmptyDir : & k8score.EmptyDirVolumeSource {},
251
+ Volumes : []k8score.Volume {
252
+ {
253
+ Name : volumeNameKFPLauncher ,
254
+ VolumeSource : k8score.VolumeSource {
255
+ EmptyDir : & k8score.EmptyDirVolumeSource {},
256
+ },
245
257
},
246
- }},
258
+ {
259
+ Name : gcsScratchName ,
260
+ VolumeSource : k8score.VolumeSource {
261
+ EmptyDir : & k8score.EmptyDirVolumeSource {},
262
+ },
263
+ },
264
+ {
265
+ Name : s3ScratchName ,
266
+ VolumeSource : k8score.VolumeSource {
267
+ EmptyDir : & k8score.EmptyDirVolumeSource {},
268
+ },
269
+ },
270
+ {
271
+ Name : minioScratchName ,
272
+ VolumeSource : k8score.VolumeSource {
273
+ EmptyDir : & k8score.EmptyDirVolumeSource {},
274
+ },
275
+ },
276
+ {
277
+ Name : dotLocalScratchName ,
278
+ VolumeSource : k8score.VolumeSource {
279
+ EmptyDir : & k8score.EmptyDirVolumeSource {},
280
+ },
281
+ },
282
+ {
283
+ Name : dotCacheScratchName ,
284
+ VolumeSource : k8score.VolumeSource {
285
+ EmptyDir : & k8score.EmptyDirVolumeSource {},
286
+ },
287
+ },
288
+ },
247
289
InitContainers : []wfapi.UserContainer {{
248
290
Container : k8score.Container {
249
291
Name : "kfp-launcher" ,
250
292
Image : GetLauncherImage (),
251
293
Command : []string {"launcher-v2" , "--copy" , component .KFPLauncherPath },
252
- VolumeMounts : []k8score.VolumeMount {{
253
- Name : volumeNameKFPLauncher ,
254
- MountPath : component .VolumePathKFPLauncher ,
255
- }},
294
+ VolumeMounts : []k8score.VolumeMount {
295
+ {
296
+ Name : volumeNameKFPLauncher ,
297
+ MountPath : component .VolumePathKFPLauncher ,
298
+ },
299
+ },
256
300
Resources : launcherResources ,
257
301
},
258
302
}},
@@ -265,10 +309,32 @@ func (c *workflowCompiler) addContainerExecutorTemplate() string {
265
309
// These are added to pass argo workflows linting.
266
310
Image : "gcr.io/ml-pipeline/should-be-overridden-during-runtime" ,
267
311
Command : []string {"should-be-overridden-during-runtime" },
268
- VolumeMounts : []k8score.VolumeMount {{
269
- Name : volumeNameKFPLauncher ,
270
- MountPath : component .VolumePathKFPLauncher ,
271
- }},
312
+ VolumeMounts : []k8score.VolumeMount {
313
+ {
314
+ Name : volumeNameKFPLauncher ,
315
+ MountPath : component .VolumePathKFPLauncher ,
316
+ },
317
+ {
318
+ Name : gcsScratchName ,
319
+ MountPath : gcsScratchLocation ,
320
+ },
321
+ {
322
+ Name : s3ScratchName ,
323
+ MountPath : s3ScratchLocation ,
324
+ },
325
+ {
326
+ Name : minioScratchName ,
327
+ MountPath : minioScratchLocation ,
328
+ },
329
+ {
330
+ Name : dotLocalScratchName ,
331
+ MountPath : dotLocalScratchLocation ,
332
+ },
333
+ {
334
+ Name : dotCacheScratchName ,
335
+ MountPath : dotCacheScratchLocation ,
336
+ },
337
+ },
272
338
EnvFrom : []k8score.EnvFromSource {metadataEnvFrom },
273
339
Env : commonEnvs ,
274
340
},
0 commit comments