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.1.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.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jhpce-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 5288e664c0fd14c54fa86db23da7a9074106d8d29a3bff333a8f1f15a643fad5
MD5 d02a20ecc0a1b9f1900e55b224557efc
BLAKE2b-256 8a3bb2e006560662c15bbbc2b74385ffe5895f847669a57480ca223f1139888d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jhpce-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da7f94fa4291cf0646c887e388292ce4c4d143ced5c45e59c6fba6c4477743f8
MD5 7f4cc0c05ab512742bd01f5383db0f42
BLAKE2b-256 257b67624f650d0bfdeb7241512dcef1c73a68f95b35eb9fe9bfe982603b6a02

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