diff --git a/docs/reference/cli.md b/docs/reference/cli.md index af3862e..e9cce7d 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -55,6 +55,7 @@ floability run --instance - `--jupyter-port INT` (default: `8888`) - `--manager-ports A,B` (default: `9123,9150`) +- `--worker-transfer-ports A:B` (optional): port range for worker-worker transfers (e.g. `10000:11000`). Passed as `--transfer-port` to vine_factory. - `--manager-name NAME`: TaskVine manager name (auto-generated if omitted) - `--env-vars KEY=VALUE,...`: environment variables to inject into the conda env diff --git a/environment.yml b/environment.yml index 8280548..c57e882 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - conda-forge dependencies: - python - - ndcctools + - ndcctools>=7.17.0 - pyyaml - requests - pip diff --git a/floability/commands/argument_groups.py b/floability/commands/argument_groups.py index e1bf054..b9623fa 100644 --- a/floability/commands/argument_groups.py +++ b/floability/commands/argument_groups.py @@ -204,3 +204,10 @@ def add_execution_args(parser: argparse.ArgumentParser) -> None: action="store_true", help="Enable debug mode for workers", ) + + vf_group.add_argument( + "--worker-transfer-ports", + required=False, + help="Port range for worker-worker transfers (e.g. 10000:11000). Passed as --transfer-port to vine_factory", + ) + diff --git a/floability/commands/workers.py b/floability/commands/workers.py index 5a6c7d0..6002da6 100644 --- a/floability/commands/workers.py +++ b/floability/commands/workers.py @@ -60,6 +60,10 @@ def add_arguments(self, parser: argparse.ArgumentParser) -> None: action="store_true", help="Enable debug mode for workers.", ) + start_parser.add_argument( + "--worker-transfer-ports", + help="Port range for worker-worker transfers (e.g. 10000:11000). Passed as --transfer-port to vine_factory", + ) # workers stop sub-command stop_parser = workers_subparsers.add_parser( diff --git a/floability/workers_manager.py b/floability/workers_manager.py index 10c849c..c52fe99 100644 --- a/floability/workers_manager.py +++ b/floability/workers_manager.py @@ -292,6 +292,7 @@ def _normalize_compute_specs( "cores": _attr(cli_args, "cores_per_worker"), "batch_options": _attr(cli_args, "batch_options"), "debug_workers": _attr(cli_args, "debug_workers"), + "transfer_port": _attr(cli_args, "worker_transfer_ports"), }, ) @@ -344,6 +345,7 @@ def _start_vine_factory( ("--timeout", "timeout"), ("--worker-extra-options", "worker_extra_options"), ("--condor-requirements", "condor_requirements"), + ("--transfer-port", "transfer_port"), ]: if cfg.get(key): cmd.append(f"{flag}={cfg[key]}")