From 70fe9a838e59afa0487b4a863931dd0797f78715 Mon Sep 17 00:00:00 2001 From: luiz Date: Fri, 13 Oct 2023 15:12:22 +0200 Subject: [PATCH] uuid container name --- rest/clients/local_docker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rest/clients/local_docker.py b/rest/clients/local_docker.py index c8216f7..f2d97fa 100644 --- a/rest/clients/local_docker.py +++ b/rest/clients/local_docker.py @@ -1,5 +1,6 @@ from pathlib import Path import docker +import uuid from ..core.logger import logger from ..models.sorting import ( @@ -65,7 +66,7 @@ def run_sorting( } container = self.client.containers.run( - name=f'si-sorting-run-{run_kwargs.run_identifier}', + name=f'si-sorting-run-{run_kwargs.run_identifier}-{uuid.uuid4().hex[:6]}', image=map_sorter_to_image[sorter_kwargs.sorter_name], command=['python', 'main.py'], detach=True,