From f7ab709a39af6981a3ae4d8985a060f92b937fdb Mon Sep 17 00:00:00 2001 From: Alay Dilipbhai Shah Date: Tue, 21 May 2024 16:29:09 -0700 Subject: [PATCH 1/2] Update setup.py --- python/setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/setup.py b/python/setup.py index fa425c98f..0e314de29 100644 --- a/python/setup.py +++ b/python/setup.py @@ -64,6 +64,8 @@ def finalize_options(self): 'uvicorn', 'wandb==0.13.2', 'wget', + # Need to pin this version due to breaking change released in python docker sdk + 'requests<2.32', ] requirements_extra_mpi = [ From 649e42fa3f259cc892ca257b822aa844627da39d Mon Sep 17 00:00:00 2001 From: Alay Shah Date: Tue, 21 May 2024 22:25:18 -0700 Subject: [PATCH 2/2] Remove Docker Client Timeout --- .../fedml/computing/scheduler/comm_utils/container_utils.py | 4 ++-- python/fedml/computing/scheduler/comm_utils/job_utils.py | 2 +- .../scheduler/model_scheduler/device_model_deployment.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/fedml/computing/scheduler/comm_utils/container_utils.py b/python/fedml/computing/scheduler/comm_utils/container_utils.py index f86e9fe1a..2f5fa31fb 100644 --- a/python/fedml/computing/scheduler/comm_utils/container_utils.py +++ b/python/fedml/computing/scheduler/comm_utils/container_utils.py @@ -26,7 +26,7 @@ def get_instance(): def get_docker_client(self): try: - client = docker.from_env(timeout=5, version="auto") + client = docker.from_env() except Exception: logging.error("Failed to connect to the docker daemon, please ensure that you have " "installed Docker Desktop or Docker Engine, and the docker is running") @@ -180,7 +180,7 @@ def get_container_rank_same_model(prefix: str): running_model_name = hash("model_endpoint_id_{}_name_{}_model_id_{}_name_{}_ver_{}") """ try: - client = docker.from_env(timeout=5, version="auto") + client = docker.from_env() except Exception: logging.error("Failed to connect to the docker daemon, please ensure that you have " "installed Docker Desktop or Docker Engine, and the docker is running") diff --git a/python/fedml/computing/scheduler/comm_utils/job_utils.py b/python/fedml/computing/scheduler/comm_utils/job_utils.py index 08ce44d1d..5b9a2c812 100644 --- a/python/fedml/computing/scheduler/comm_utils/job_utils.py +++ b/python/fedml/computing/scheduler/comm_utils/job_utils.py @@ -570,7 +570,7 @@ def get_run_container_name(run_id: int) -> str: @staticmethod def get_docker_client(docker_args: DockerArgs) -> DockerClient: try: - client = docker.from_env(timeout=5, version="auto") + client = docker.from_env() if docker_args.username != "" and docker_args.registry != "": client.login(username=docker_args.username, password=docker_args.password, registry=docker_args.registry) except Exception as e: diff --git a/python/fedml/computing/scheduler/model_scheduler/device_model_deployment.py b/python/fedml/computing/scheduler/model_scheduler/device_model_deployment.py index f54965b59..1876373d2 100755 --- a/python/fedml/computing/scheduler/model_scheduler/device_model_deployment.py +++ b/python/fedml/computing/scheduler/model_scheduler/device_model_deployment.py @@ -210,7 +210,7 @@ def start_deployment(end_point_id, end_point_name, model_id, model_version, infer_host = "127.0.0.1" try: - client = docker.from_env(timeout=5, version="auto") + client = docker.from_env() if enable_custom_image and docker_registry_user_name != "" and docker_registry_user_password != "" \ and docker_registry != "": client.login(username=docker_registry_user_name, password=docker_registry_user_password, @@ -467,7 +467,7 @@ def log_deployment_result(end_point_id, model_id, cmd_container_name, cmd_type, logging.info(f"Attempt: {deploy_attempt} / {deploy_attempt_threshold} ...") try: - client = docker.from_env(timeout=5, version="auto") + client = docker.from_env() except Exception: logging.error("Failed to connect to the docker daemon, please ensure that you have " "installed Docker Desktop or Docker Engine, and the docker is running")