Skip to content

Commit

Permalink
adding a fix for timeout on testing singularity containers
Browse files Browse the repository at this point in the history
  • Loading branch information
haimasree committed Mar 9, 2022
1 parent 75d253e commit 1e01735
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion kipoi_containers/update_all_singularity_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
)


def get_sharedpy3keras_models(all_models):
model_list = []
for model in all_models:
if not any(model.split("/")[0] in s for s in model_list):
model_list.append(model)
return model_list


@click.command()
def run_update() -> None:
"""Update all singularity images. By default, it will push the image to
Expand Down Expand Up @@ -45,6 +53,7 @@ def run_update() -> None:
)
else:
docker_to_model_group_dict_ci[kipoi_docker_image] = [model_group]

for docker_image in docker_to_model_group_dict_ci.keys():
model_or_model_group_list = docker_to_model_group_dict_ci[docker_image]
singularity_pull_folder = os.environ.get(
Expand All @@ -58,7 +67,13 @@ def run_update() -> None:
singularity_image_folder=singularity_pull_folder,
model_group_to_singularity_dict=model_group_to_singularity_dict,
)
models_to_test = docker_to_model_dict[docker_image]
if "shared" in docker_image:
models_to_test = get_sharedpy3keras_models(
docker_to_model_dict[docker_image]
)
# Otherwise it will take more than 6 hours - available time on actions ci
else:
models_to_test = docker_to_model_dict[docker_image]
singularity_handler.update(models_to_test)
if len(model_or_model_group_list) > 1:
for model_or_model_group in model_or_model_group_list[1:]:
Expand Down

0 comments on commit 1e01735

Please sign in to comment.