Skip to main content

A package for using python to work on the Johns Hopkins Joint High performance Computing Exchange

Project description

jhpce-python

This is a repository to apply and use JHPCE cluster management locally in python.

Dependencies

To install the dependencies listed in the requirements.txt file, you can use the following command:

pip install -r requirements.txt

Loading

Until it gets put on pypi, you can load with (for example)

from jhpce.jhpce.module import *
from jhpce.jhpce.keygen import *

where you're in the root directory of the jhpce-python.

Public/private key pairs

If you don't already have a private key / public key pair. We require a password on our private key. You can generate a public private key par with the command:

key = keygen("id_jhpce", "****")

where **** is your desired password. This will print out a public key text that you need to paste into ~/.ssh/authorized_keys on jhpce.

You should only need to generate your key once, do not save your password in plain text and do not commit your keys to a public repo

Given that you have private key, one can load a key with

key = loadkey('filename')

The path to the filename needs to be the full path if it's not in the current working directory.

DO NOT ACCIDENTALLY COMMIT AND PUSH YOUR PRIVATE KEY OR PASSWORD TO A GITHUB REPO

Establishing a connection

From the root directory of this repo. One can establish a connection witih

## Establish a connection, key is as above
con = jhpce("USERNAME", key)
## It keeps track of a local directory
con.local_set_repo("DIRECTORY ON LOCAL")
## It can execute some remote commands
con.remote_ls(return_as_pd = True)
## It can set a remote directory
con.remote_set_dir("DIRECTORY ON CLUSTER")
## Read the slurm queue
out = con.remote_squeue()['stdout']

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

jhpce-0.0.2.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jhpce-0.0.2-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file jhpce-0.0.2.tar.gz.

File metadata

  • Download URL: jhpce-0.0.2.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for jhpce-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8237bbd931794971659bb8fbf711ba44a515a2a259dc7d93b9647c5e5ec0f3ac
MD5 9c9b62fa75e490176e08b5e1ce533c0e
BLAKE2b-256 3462ec447ea2be6f1b00ba471d98241af301a7025b1e0bcd4a6d02e01a3818b0

See more details on using hashes here.

File details

Details for the file jhpce-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: jhpce-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for jhpce-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9fa19ae1a176aa7a635c634e4097391cc17588a5cdc7786e298d3754b47384c5
MD5 7af8410ac7751a1cfb611cac2af5f0e9
BLAKE2b-256 039cc405b942f5bb92642171260bf7152f61140e703b41735aaad7b4b6f46933

See more details on using hashes here.

Supported by

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