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
    # 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.

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.3.tar.gz (7.5 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.3-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: job_queue_lambda-0.0.3.tar.gz
  • Upload date:
  • Size: 7.5 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.3.tar.gz
Algorithm Hash digest
SHA256 24de2813e148e9a9ff4d2c490ab19197561929a3c83e8863f98b26f081151fb0
MD5 76ef8961eb9470e0314629e8df560ee9
BLAKE2b-256 7a7a4aceb828b1677b8185b5f0eb2bc3e97d177d5ecc13fce8f2fb450818421d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: job_queue_lambda-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 53149841d8c2db94405c68f87f92b61ec08e8bbd5cd46d761b5bfa7a3c5b2a0e
MD5 6aac120bee3201512a87719ff7adcfe3
BLAKE2b-256 ff82e13927096cbca69d3b432ad073eaccf093bfd9c8a8d38ea941d61fed9313

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