Skip to main content

Covalent SSH Plugin

Project description

 

covalent python tests codecov apache

Covalent SSH Plugin

Covalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware. This executor plugin interfaces Covalent with other machines accessible to the user over SSH. It is appropriate to use this plugin to distribute tasks to one or more compute backends which are not controlled by a cluster management system, such as computers on a LAN, or even a collection of small-form-factor Linux-based devices such as Raspberry Pis, NVIDIA Jetsons, or Xeon Phi co-processors.

To use this plugin with Covalent, simply install it using pip:

pip install covalent-ssh-plugin

The following shows an example of how a user might modify their Covalent configuration to support this plugin:

[executors.ssh]
username = "user"
hostname = "host.hostname.org"
remote_cache_dir = "/home/user/.cache/covalent"
ssh_key_file = "/home/user/.ssh/id_rsa"
python_path = "python"
conda_env = ""

This setup assumes the user has the ability to connect to the remote machine using ssh -i /home/user/.ssh/id_rsa user@host.hostname.org and has write-permissions on the remote directory /home/user/.cache/covalent (if it exists) or the closest parent directory (if it does not).

If you are using a named conda environment you can use the conda_env parameter to set the name of your conda environment. However if you wish use a specify a particular python binary you can configure the python_path parameter to the absolute path where python is located on the remote machine.

Within a workflow, users can decorate electrons using the default settings:

import covalent as ct

@ct.electron(executor="ssh")
def my_task():
    import socket
    return socket.gethostname()

or use a class object to customize behavior within particular tasks:

executor = ct.executor.SSHExecutor(
    username="user",
    hostname="host2.hostname.org",
    remote_cache_dir="/tmp/covalent",
    ssh_key_file="/home/user/.ssh/host2/id_rsa"
)

@ct.electron(executor=executor)
def my_custom_task(x, y):
    return x + y

For more information on how to get started with Covalent, check out the project homepage and the official documentation.

Release Notes

Release notes are available in the Changelog.

Citation

Please use the following citation in any publications:

W. J. Cunningham, S. K. Radha, F. Hasan, J. Kanem, S. W. Neagle, and S. Sanand. Covalent. Zenodo, 2022. https://doi.org/10.5281/zenodo.5903364

License

Covalent is licensed under the Apache License 2.0. See the LICENSE file or contact the support team for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

covalent-ssh-plugin-0.24.1.tar.gz (15.7 kB view details)

Uploaded Source

File details

Details for the file covalent-ssh-plugin-0.24.1.tar.gz.

File metadata

  • Download URL: covalent-ssh-plugin-0.24.1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for covalent-ssh-plugin-0.24.1.tar.gz
Algorithm Hash digest
SHA256 0c1f1567432fa62f30d6fdd61d358a3dbc938350649e0e4f8c63889e5692f689
MD5 7cf8a3ba4b8766e91a9a80f2f763abd9
BLAKE2b-256 d99c0673949a1f5feada7f27ad0f659976eb395c82447a94937da8264afbc7f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page