diff --git a/CHANGELOG.md b/CHANGELOG.md index f03c8f9..2e44414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added a docker based SLURM cluster in the CI pipeline for testing the plugin. - Ignoring `tests/docker_tests` directory from pytest. + +## [0.18.1] - 24-11-25 + +### Added + +- `ssh_port` options in the slurmExecutor to allow connection to HPC system that use alternative port for `ssh`. + ## [0.18.0] - 2024-01-26 ### Added diff --git a/README.md b/README.md index 4a9e052..d31c71e 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,17 @@ pip install covalent-slurm-plugin On the remote system, the Python version in the environment you plan to use must match that used when dispatching the calculations. Additionally, the remote system's Python environment must have the base [covalent package](https://github.com/AgnostiqHQ/covalent) installed (e.g. `pip install covalent`). + +For development use the following to build it. + +- Create a python environment, and in that environment install `pip install build` +- Go to the source folder, and run + +```bash +python -m build +``` + + ## Usage The following shows an example of a Covalent [configuration](https://covalent.readthedocs.io/en/latest/how_to/config/customization.html) that is modified to support Slurm: diff --git a/VERSION b/VERSION index 6633391..249afd5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.18.0 +0.18.1 diff --git a/covalent_slurm_plugin/slurm.py b/covalent_slurm_plugin/slurm.py index 96c0191..7f94d54 100644 --- a/covalent_slurm_plugin/slurm.py +++ b/covalent_slurm_plugin/slurm.py @@ -47,6 +47,7 @@ class ExecutorPluginDefaults(BaseModel): address: Optional[str] = "" ssh_key_file: Optional[str] = "" cert_file: Optional[str] = None + ssh_port: Optional[int] = 22 remote_workdir: Optional[str] = "covalent-workdir" create_unique_workdir: bool = False variables: Optional[Dict[str, str]] = Field(default_factory=dict) @@ -120,6 +121,8 @@ def __init__( address: Optional[str] = None, ssh_key_file: Optional[str] = None, cert_file: Optional[str] = None, + # added ssh port option: Rajarshi + ssh_port: Optional[int] = 22, remote_workdir: Optional[str] = None, create_unique_workdir: bool = False, options: Optional[Dict] = None, @@ -150,6 +153,8 @@ def __init__( self.address = address or get_config("executors.slurm.address") self.ssh_key_file = ssh_key_file or get_config("executors.slurm.ssh_key_file") self.cert_file = cert_file or get_config("executors.slurm").get("cert_file", None) + # add ssh port: Rajarshi + self.ssh_port = ssh_port or get_config("executors.slurm").get("ssh_port", 22) self.remote_workdir = remote_workdir or get_config("executors.slurm.remote_workdir") self.variables = variables or get_config("executors.slurm.variables") self.conda_env = conda_env or get_config("executors.slurm.conda_env") @@ -235,6 +240,7 @@ async def _client_connect(self) -> asyncssh.SSHClientConnection: try: conn = await asyncssh.connect( self.address, + port=self.ssh_port, username=self.username, client_keys=client_keys, known_hosts=None,