Skip to main content

No project description provided

Project description

job-queue-lambda

PyPI version PyPI - Downloads PyPI - Python Version

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
    ssh:
      host: ikkem-hpc
      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.

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

job_queue_lambda-0.0.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

job_queue_lambda-0.0.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: job_queue_lambda-0.0.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.12 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for job_queue_lambda-0.0.1.tar.gz
Algorithm Hash digest
SHA256 38bca0d1640cdb190b3503d7ba0cfead4f48db49686ab9b6999b1e7f63e1f07b
MD5 39b83bda2e0b3c11d778a684382d3e71
BLAKE2b-256 9f5ebe292d0f9cc39d5cbb3fe66094cc13e4e46631ee69ce0f2b25c58960424c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: job_queue_lambda-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.12 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for job_queue_lambda-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c9995a13952edecd20016509a40311012acb94e0b78e92f1d992de6fd1b1ef6
MD5 297059bc7c1134292824e7ae7e3845cf
BLAKE2b-256 37e52a303854dfd93582f63c5cf40fdd415cb3a0a996db7136876a80075edc32

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