Skip to content

Commit

Permalink
refactor: gRPC remote FTS refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hpohekar committed Apr 29, 2024
1 parent 66921e1 commit 722bea3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
8 changes: 5 additions & 3 deletions src/ansys/fluent/core/launcher/container_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ class DockerLauncher:

def __init__(
self,
mode: FluentMode,
ui_mode: UIMode,
graphics_driver: Union[FluentWindowsGraphicsDriver, FluentLinuxGraphicsDriver],
mode: Optional[Union[FluentMode, str, None]] = None,
ui_mode: Union[UIMode, str, None] = None,
graphics_driver: Union[
FluentWindowsGraphicsDriver, FluentLinuxGraphicsDriver, str, None
] = None,
product_version: Optional[FluentVersion] = None,
version: Optional[str] = None,
precision: Optional[str] = None,
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/fluent/core/launcher/fluent_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def configure_container_dict(
logger.debug(f"container_dict before processing: {container_dict}")

if not host_mount_path:
host_mount_path = pyfluent.EXAMPLES_PATH
host_mount_path = pyfluent.USER_DATA_PATH
elif "volumes" in container_dict:
logger.warning(
"'volumes' keyword specified in 'container_dict', but "
Expand Down
8 changes: 5 additions & 3 deletions src/ansys/fluent/core/launcher/pim_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ class PIMLauncher:

def __init__(
self,
mode: FluentMode,
ui_mode: UIMode,
graphics_driver: Union[FluentWindowsGraphicsDriver, FluentLinuxGraphicsDriver],
mode: Optional[Union[FluentMode, str, None]] = None,
ui_mode: Union[UIMode, str, None] = None,
graphics_driver: Union[
FluentWindowsGraphicsDriver, FluentLinuxGraphicsDriver, str, None
] = None,
product_version: Optional[FluentVersion] = None,
version: Optional[str] = None,
precision: Optional[str] = None,
Expand Down
8 changes: 5 additions & 3 deletions src/ansys/fluent/core/launcher/standalone_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ class StandaloneLauncher:

def __init__(
self,
mode: FluentMode,
ui_mode: UIMode,
graphics_driver: Union[FluentWindowsGraphicsDriver, FluentLinuxGraphicsDriver],
mode: Optional[Union[FluentMode, str, None]] = None,
ui_mode: Union[UIMode, str, None] = None,
graphics_driver: Union[
FluentWindowsGraphicsDriver, FluentLinuxGraphicsDriver, str, None
] = None,
product_version: Optional[FluentVersion] = None,
version: Optional[str] = None,
precision: Optional[str] = None,
Expand Down
4 changes: 3 additions & 1 deletion src/ansys/fluent/core/utils/file_transfer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ def __init__(
container_mount_path if container_mount_path else "/home/container/workdir/"
)
self.host_mount_path = (
host_mount_path if host_mount_path else pyfluent.EXAMPLES_PATH
host_mount_path if host_mount_path else pyfluent.USER_DATA_PATH
)
if not pathlib.Path(self.host_mount_path).exists():
pathlib.Path(self.host_mount_path).mkdir(parents=True, exist_ok=True)
try:
self.host_port = port if port else random.randint(5000, 6000)
self.ports = {"50000/tcp": self.host_port}
Expand Down

0 comments on commit 722bea3

Please sign in to comment.