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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5288e664c0fd14c54fa86db23da7a9074106d8d29a3bff333a8f1f15a643fad5
|
|
| MD5 |
d02a20ecc0a1b9f1900e55b224557efc
|
|
| BLAKE2b-256 |
8a3bb2e006560662c15bbbc2b74385ffe5895f847669a57480ca223f1139888d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da7f94fa4291cf0646c887e388292ce4c4d143ced5c45e59c6fba6c4477743f8
|
|
| MD5 |
7f4cc0c05ab512742bd01f5383db0f42
|
|
| BLAKE2b-256 |
257b67624f650d0bfdeb7241512dcef1c73a68f95b35eb9fe9bfe982603b6a02
|