Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Docker Issues #2129

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion python/fedml/computing/scheduler/comm_utils/job_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
Loading