job-queue-lambda
Use job queue (Slurm, PBS, etc) as a remote function executor, just like AWS Lambda.
Installation
pip install job-queue-lambda
Getting Started
job-queue-lambda allows you to forward a HTTP request to a service that running on a remote job queue. Currently only Slurm is supported.
For example, you can use the following configuration:
# ./examples/config.yaml
clusters:
- name: ikkem-hpc
# if running on login node, then ssh section is not needed
ssh:
host: ikkem-hpc
# it use ssh dynamic port forwarding to connect to the cluster, so socks_port is required
socks_port: 10801
lambdas:
- name: python-http
forward_to: http://{NODE_NAME}:8080/
cwd: ./jq-lambda-demo
script: |
#!/bin/bash
#SBATCH -N 1
#SBATCH --job-name=python-http
#SBATCH --partition=cpu
set -e
timeout 30 python3 -m http.server 8080
job_queue:
slurm: {}
And then you can start the server by running:
jq-lambda ./examples/config.yaml
Now you can use browser to access the following URL: http://localhost:9000/clusters/ikkem-hpc/lambdas/python-http
or using curl:
curl http://localhost:9000/clusters/ikkem-hpc/lambdas/python-http
The request will be forwarded to the remote job queue, and the response will be returned to you.
Metadata
Release files for job-queue-lambda 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| job_queue_lambda-0.0.3.tar.gz | 7.5 kB | Without provenance | Details for job_queue_lambda-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| job_queue_lambda-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for job_queue_lambda-0.0.3-py3-none-any.whl |
Total release size: 16.7 kB
Release files / job_queue_lambda-0.0.3.tar.gz
| Download URL | job_queue_lambda-0.0.3.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24de2813e148e9a9ff4d2c490ab19197561929a3c83e8863f98b26f081151fb0
|
|
BLAKE2b-256 checksum How to use checksums |
7a7a4aceb828b1677b8185b5f0eb2bc3e97d177d5ecc13fce8f2fb450818421d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.9.12 Linux/5.15.167.4-microsoft-standard-WSL2
|
Release files / job_queue_lambda-0.0.3-py3-none-any.whl
| Download URL | job_queue_lambda-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53149841d8c2db94405c68f87f92b61ec08e8bbd5cd46d761b5bfa7a3c5b2a0e
|
|
BLAKE2b-256 checksum How to use checksums |
ff82e13927096cbca69d3b432ad073eaccf093bfd9c8a8d38ea941d61fed9313
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.9.12 Linux/5.15.167.4-microsoft-standard-WSL2
|
Security for job-queue-lambda 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.