Skip to content

Commit aba7ec4

Browse files
authored
feat(clp-package): Replace package execution container with clp-package; Change default taskfile task to docker-images:package. (#1357)
1 parent 9e10b99 commit aba7ec4

File tree

18 files changed

+37
-211
lines changed

18 files changed

+37
-211
lines changed

.github/actions/clp-build-runtime-image/action.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: "clp-build-runtime-image"
22
description: "Builds a container image to be used for running CLP."
33

44
inputs:
5-
image_type:
6-
description: "Type of image to build"
7-
required: true
85
image_registry:
96
default: "ghcr.io"
107
description: "Container image registry"
@@ -52,15 +49,8 @@ runs:
5249
shell: "bash"
5350
run: |
5451
base_path="./tools/docker-images"
55-
56-
if [[ "${{inputs.image_type}}" == "execution" ]]; then
57-
platform="${{inputs.platform_id}}-${{inputs.platform_version_id}}"
58-
dockerfile_path="$base_path/clp-execution-base-$platform/Dockerfile"
59-
image_name="clp-${{inputs.image_type}}-$platform"
60-
else
61-
dockerfile_path="$base_path/clp-package/Dockerfile"
62-
image_name="clp-${{inputs.image_type}}"
63-
fi
52+
image_name="clp-package"
53+
dockerfile_path="$base_path/$image_name/Dockerfile"
6454
6555
echo "DOCKERFILE=$dockerfile_path" >> "$GITHUB_OUTPUT"
6656
echo "IMAGE_NAME=$image_name" >> "$GITHUB_OUTPUT"

.github/workflows/clp-artifact-build.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,6 @@ jobs:
541541
542542
- uses: "./.github/actions/clp-build-runtime-image"
543543
with:
544-
image_type: "package"
545544
image_registry: "ghcr.io"
546545
image_registry_username: "${{github.actor}}"
547546
image_registry_password: "${{secrets.GITHUB_TOKEN}}"

.github/workflows/clp-execution-image-build.yaml

Lines changed: 0 additions & 71 deletions
This file was deleted.

components/clp-package-utils/clp_package_utils/general.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def load_config_file(
427427
clp_config = CLPConfig()
428428

429429
clp_config.make_config_paths_absolute(clp_home)
430-
clp_config.load_execution_container_name()
430+
clp_config.load_container_image_ref()
431431

432432
validate_path_for_container_mount(clp_config.data_directory)
433433
validate_path_for_container_mount(clp_config.logs_directory)

components/clp-package-utils/clp_package_utils/scripts/archive_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def main(argv: List[str]) -> int:
229229
CLP_DB_PASS_ENV_VAR_NAME: clp_config.database.password,
230230
}
231231
container_start_cmd: List[str] = generate_container_start_cmd(
232-
container_name, necessary_mounts, clp_config.execution_container, extra_env_vars
232+
container_name, necessary_mounts, clp_config.container_image_ref, extra_env_vars
233233
)
234234

235235
# fmt: off

components/clp-package-utils/clp_package_utils/scripts/compress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def main(argv):
249249
CLP_DB_PASS_ENV_VAR_NAME: clp_config.database.password,
250250
}
251251
container_start_cmd = generate_container_start_cmd(
252-
container_name, necessary_mounts, clp_config.execution_container, extra_env_vars
252+
container_name, necessary_mounts, clp_config.container_image_ref, extra_env_vars
253253
)
254254
compress_cmd = _generate_compress_cmd(
255255
parsed_args, dataset, generated_config_path_on_container, logs_list_path_on_container

components/clp-package-utils/clp_package_utils/scripts/dataset_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def main(argv: List[str]) -> int:
149149
CLP_DB_PASS_ENV_VAR_NAME: clp_config.database.password,
150150
}
151151
container_start_cmd = generate_container_start_cmd(
152-
container_name, necessary_mounts, clp_config.execution_container, extra_env_vars
152+
container_name, necessary_mounts, clp_config.container_image_ref, extra_env_vars
153153
)
154154

155155
if len(aws_env_vars) != 0:

components/clp-package-utils/clp_package_utils/scripts/decompress.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def handle_extract_file_cmd(
132132
CLP_DB_PASS_ENV_VAR_NAME: clp_config.database.password,
133133
}
134134
container_start_cmd = generate_container_start_cmd(
135-
container_name, necessary_mounts, clp_config.execution_container, extra_env_vars
135+
container_name, necessary_mounts, clp_config.container_image_ref, extra_env_vars
136136
)
137137

138138
# fmt: off
@@ -211,7 +211,7 @@ def handle_extract_stream_cmd(
211211
CLP_DB_PASS_ENV_VAR_NAME: clp_config.database.password,
212212
}
213213
container_start_cmd = generate_container_start_cmd(
214-
container_name, necessary_mounts, clp_config.execution_container, extra_env_vars
214+
container_name, necessary_mounts, clp_config.container_image_ref, extra_env_vars
215215
)
216216

217217
# fmt: off

components/clp-package-utils/clp_package_utils/scripts/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def main(argv):
134134
CLP_DB_PASS_ENV_VAR_NAME: clp_config.database.password,
135135
}
136136
container_start_cmd = generate_container_start_cmd(
137-
container_name, necessary_mounts, clp_config.execution_container, extra_env_vars
137+
container_name, necessary_mounts, clp_config.container_image_ref, extra_env_vars
138138
)
139139

140140
# fmt: off

components/clp-package-utils/clp_package_utils/scripts/start_clp.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def create_db_tables(
261261
mounts.generated_config_file,
262262
]
263263
append_docker_options(container_start_cmd, necessary_mounts, env_vars)
264-
container_start_cmd.append(clp_config.execution_container)
264+
container_start_cmd.append(clp_config.container_image_ref)
265265

266266
clp_py_utils_dir = clp_site_packages_dir / "clp_py_utils"
267267
# fmt: off
@@ -306,7 +306,7 @@ def create_results_cache_indices(
306306
env_vars = [f"PYTHONPATH={clp_site_packages_dir}"]
307307
necessary_mounts = [mounts.clp_home, mounts.data_dir, mounts.logs_dir]
308308
append_docker_options(container_start_cmd, necessary_mounts, env_vars)
309-
container_start_cmd.append(clp_config.execution_container)
309+
container_start_cmd.append(clp_config.container_image_ref)
310310

311311
clp_py_utils_dir = clp_site_packages_dir / "clp_py_utils"
312312
# fmt: off
@@ -627,7 +627,7 @@ def generic_start_scheduler(
627627
):
628628
necessary_mounts.append(mounts.input_logs_dir)
629629
append_docker_options(container_start_cmd, necessary_mounts, env_vars)
630-
container_start_cmd.append(clp_config.execution_container)
630+
container_start_cmd.append(clp_config.container_image_ref)
631631

632632
# fmt: off
633633
scheduler_cmd = [
@@ -762,7 +762,7 @@ def generic_start_worker(
762762
env_vars.extend(aws_env_vars)
763763

764764
append_docker_options(container_start_cmd, necessary_mounts, env_vars)
765-
container_start_cmd.append(clp_config.execution_container)
765+
container_start_cmd.append(clp_config.container_image_ref)
766766

767767
worker_cmd = [
768768
"python3",
@@ -969,7 +969,7 @@ def start_webui(
969969
necessary_mounts.append(mounts.stream_output_dir)
970970

971971
append_docker_options(container_cmd, necessary_mounts, env_vars)
972-
container_cmd.append(clp_config.execution_container)
972+
container_cmd.append(clp_config.container_image_ref)
973973

974974
node_cmd = [
975975
str(CONTAINER_CLP_HOME / "bin" / "node-22"),
@@ -1023,7 +1023,7 @@ def start_reducer(
10231023
mounts.generated_config_file,
10241024
]
10251025
append_docker_options(container_start_cmd, necessary_mounts, env_vars)
1026-
container_start_cmd.append(clp_config.execution_container)
1026+
container_start_cmd.append(clp_config.container_image_ref)
10271027

10281028
# fmt: off
10291029
reducer_cmd = [
@@ -1101,7 +1101,7 @@ def start_garbage_collector(
11011101
env_vars.extend(aws_env_vars)
11021102

11031103
append_docker_options(container_start_cmd, necessary_mounts, env_vars)
1104-
container_start_cmd.append(clp_config.execution_container)
1104+
container_start_cmd.append(clp_config.container_image_ref)
11051105

11061106
# fmt: off
11071107
garbage_collector_cmd = [

0 commit comments

Comments
 (0)