Skip to content

Commit a0399cf

Browse files
committed
Switch to slim base images to reduce container image sizes
Replace full base images with their slim variants across Dockerfiles, SDK defaults, component definitions, and all test/golden files. - Update _DEFAULT_BASE_IMAGE from python:3.11 to python:3.11-slim - Switch debian:stable to debian:stable-slim in backend Dockerfile - Switch node:22.19 to node:22.19-slim in frontend Dockerfile - Update 8 starry_net components from python:3.9 to python:3.9-slim - Install wget/curl in slim compiler stage (not present in slim) - Regenerate all compiled workflow and protobuf golden files - Update all test expectations to match slim image names Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
1 parent b302910 commit a0399cf

304 files changed

Lines changed: 8293 additions & 1753 deletions

File tree

Some content is hidden

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

backend/src/apiserver/config/testdata/sample_pipeline.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ deploymentSpec:
3232
'
3333
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
3434
\ *\n\ndef hello_world():\n print('hello')\n\n"
35-
image: python:3.11
35+
image: python:3.11-slim
3636
pipelineInfo:
3737
name: pipeline-hello-world
3838
root:

backend/src/apiserver/server/test/pipeline_with_volume.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ deploymentSpec:
6666
'
6767
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
6868
\ *\n\ndef comp():\n pass\n\n"
69-
image: python:3.11
69+
image: python:3.11-slim
7070
exec-comp-2:
7171
container:
7272
args:
@@ -92,7 +92,7 @@ deploymentSpec:
9292
'
9393
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
9494
\ *\n\ndef comp():\n pass\n\n"
95-
image: python:3.11
95+
image: python:3.11-slim
9696
exec-comp-3:
9797
container:
9898
args:
@@ -118,7 +118,7 @@ deploymentSpec:
118118
'
119119
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
120120
\ *\n\ndef comp():\n pass\n\n"
121-
image: python:3.11
121+
image: python:3.11-slim
122122
exec-createpvc:
123123
container:
124124
image: argostub/createpvc

backend/src/apiserver/server/test/v2-hello-world.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"program_path=$(mktemp)\nprintf \"%s\" \"$0\" > \"$program_path\"\npython3 -u \"$program_path\" \"$@\"\n",
2323
"def hello_world(text):\n print(text)\n return text\n\nimport argparse\n_parser = argparse.ArgumentParser(prog='Hello world', description='')\n_parser.add_argument(\"--text\", dest=\"text\", type=str, required=True, default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\n_outputs = hello_world(**_parsed_args)\n"
2424
],
25-
"image": "python:3.11"
25+
"image": "python:3.11-slim"
2626
}
2727
}
2828
}

backend/src/apiserver/server/test/xgboost_sample_pipeline.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ deploymentSpec:
293293
\ try:\n os.makedirs(os.path.dirname(output_file))\n except\
294294
\ OSError:\n pass\n with open(output_file, 'w') as f:\n \
295295
\ f.write(_output_serializers[idx](_outputs[idx]))\n"
296-
image: python:3.11
296+
image: python:3.11-slim
297297
exec-xgboost-predict:
298298
container:
299299
args:
@@ -344,7 +344,7 @@ deploymentSpec:
344344
_parser.add_argument(\"--predictions\", dest=\"predictions_path\", type=_make_parent_dirs_and_return_path,\
345345
\ required=True, default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
346346
\n_outputs = xgboost_predict(**_parsed_args)\n"
347-
image: python:3.11
347+
image: python:3.11-slim
348348
exec-xgboost-predict-2:
349349
container:
350350
args:
@@ -398,7 +398,7 @@ deploymentSpec:
398398
predictions_path\", type=_make_parent_dirs_and_return_path, required=True,\
399399
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
400400
\n_outputs = xgboost_predict(**_parsed_args)\n"
401-
image: python:3.11
401+
image: python:3.11-slim
402402
exec-xgboost-predict-3:
403403
container:
404404
args:
@@ -452,7 +452,7 @@ deploymentSpec:
452452
predictions_path\", type=_make_parent_dirs_and_return_path, required=True,\
453453
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
454454
\n_outputs = xgboost_predict(**_parsed_args)\n"
455-
image: python:3.11
455+
image: python:3.11-slim
456456
exec-xgboost-predict-4:
457457
container:
458458
args:
@@ -503,7 +503,7 @@ deploymentSpec:
503503
_parser.add_argument(\"--predictions\", dest=\"predictions_path\", type=_make_parent_dirs_and_return_path,\
504504
\ required=True, default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
505505
\n_outputs = xgboost_predict(**_parsed_args)\n"
506-
image: python:3.11
506+
image: python:3.11-slim
507507
exec-xgboost-train:
508508
container:
509509
args:
@@ -620,7 +620,7 @@ deploymentSpec:
620620
, dest=\"model_config_path\", type=_make_parent_dirs_and_return_path, required=True,\
621621
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
622622
\n_outputs = xgboost_train(**_parsed_args)\n"
623-
image: python:3.11
623+
image: python:3.11-slim
624624
exec-xgboost-train-2:
625625
container:
626626
args:
@@ -737,7 +737,7 @@ deploymentSpec:
737737
, dest=\"model_config_path\", type=_make_parent_dirs_and_return_path, required=True,\
738738
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
739739
\n_outputs = xgboost_train(**_parsed_args)\n"
740-
image: python:3.11
740+
image: python:3.11-slim
741741
pipelineInfo:
742742
name: xgboost-sample-pipeline
743743
root:

backend/src/apiserver/template/testdata/hello_world.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ deploymentSpec:
3131
_parsed_args = vars(_parser.parse_args())
3232
3333
_outputs = hello_world(**_parsed_args)
34-
image: python:3.11
34+
image: python:3.11-slim
3535
pipelineInfo:
3636
name: namespace/n1/pipeline/hello-world
3737
root:

backend/src/apiserver/template/testdata/hello_world_schema_2_0_0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ deploymentSpec:
3030
_parsed_args = vars(_parser.parse_args())
3131
3232
_outputs = hello_world(**_parsed_args)
33-
image: python:3.11
33+
image: python:3.11-slim
3434
pipelineInfo:
3535
name: hello-world
3636
root:

backend/src/apiserver/template/testdata/pipeline_with_volume.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ deploymentSpec:
6868
'
6969
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
7070
\ *\n\ndef comp():\n pass\n\n"
71-
image: python:3.11
71+
image: python:3.11-slim
7272
exec-comp-2:
7373
container:
7474
args:
@@ -94,7 +94,7 @@ deploymentSpec:
9494
'
9595
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
9696
\ *\n\ndef comp():\n pass\n\n"
97-
image: python:3.11
97+
image: python:3.11-slim
9898
exec-comp-3:
9999
container:
100100
args:
@@ -120,7 +120,7 @@ deploymentSpec:
120120
'
121121
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
122122
\ *\n\ndef comp():\n pass\n\n"
123-
image: python:3.11
123+
image: python:3.11-slim
124124
exec-createpvc:
125125
container:
126126
image: argostub/createpvc
Binary file not shown.

backend/test/proto_tests/testdata/generated-1791485/pipeline_version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"program_path=$(mktemp -d)\n\nprintf \"%s\" \"$0\" > \"$program_path/ephemeral_component.py\"\n_KFP_RUNTIME=true python3 -m kfp.dsl.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n",
3535
"\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef hello_world():\n print(\"hello world\")\n\n"
3636
],
37-
"image": "python:3.11"
37+
"image": "python:3.11-slim"
3838
}
3939
}
4040
}
Binary file not shown.

0 commit comments

Comments
 (0)