Skip to main content

hypha-launcher

Run triton server on HPC

Install with PyPi MIT license

Work In Progress

Features

  • CLI/API for:
    • downloading model from s3 and pulling docker image of triton server
    • launch s3 server
    • launch triton server
    • ...
  • Support different container engines
    • Docker
    • Apptainer
  • Support different compute environments
    • Local
    • Slurm

Installation

pip install hypha-launcher

CLI Usage

hypha-launcher --help

Launch the BioEngine Worker on HPC

BioEngine consists of a set of services that are used to serve AI models from bioimage.io. We provide the model test run feature accessible from https://bioimage.io and a dedicated bioengine web client: https://bioimage-io.github.io/bioengine-web-client/. While our public instance is openly accessible for testing and evaluation, you can run your own instance of the BioEngine worker to serve the models, e.g. with your own HPC computing resources.

Download all models from s3 and launch triton server.

Launch on HPC cluster. You need to set the job command template via the HYPHA_HPC_JOB_TEMPLATE environment variable for your own HPC cluster.

For example, here is an example for launching the BioEngine on a Slurm cluster:

# Please replace the job command with your own settings
export HYPHA_HPC_JOB_TEMPLATE="srun -A Your-Slurm-Account -t 03:00:00 --gpus-per-node A100:1 {cmd}"
python -m hypha_launcher launch_bioengine_worker --hypha-server-url https://ai.imjoy.io --triton-service-id my-triton

In the above example, the job command template is set to use the Slurm scheduler with the specified account and time limit. The {cmd} placeholder will be replaced with the actual command to launch jobs.

Optionally, you can also set the store path for storing the models and the triton server configuration via the HYPHA_LAUNCHER_STORE_DIR environment variable. By default, the store path is set to .hypha-launcher.

export HYPHA_LAUNCHER_STORE_DIR=".hypha-launcher"

Download model from s3

python -m hypha-launcher - download_models_from_s3 bioengine-model-runner.* --n_parallel=5

Pull docker image of triton server

python -m hypha-launcher - pull_image

TODO

  • Download model from s3
  • Pull docker image of triton server
  • Run triton server
  • Register service on hypha
  • Conmmunicate with triton server
  • Test on HPC
  • Support run on local machine without GPU
  • Support launch containers inside a container (For support run inside the podman-desktop)
  • Job management(Auto stop and restart)
  • Load balancing
  • Documentation

Development

Install the package in editable mode with the following command:

pip install -e .
pip install -r requirements-dev.txt

Metadata

Release files for hypha-launcher 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hypha-launcher 0.1.3
File Size Uploaded
hypha_launcher-0.1.3.tar.gz 15.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hypha-launcher 0.1.3
File Interpreter ABI Platform
hypha_launcher-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 30.9 kB

Release files / hypha_launcher-0.1.3.tar.gz

Download URL hypha_launcher-0.1.3.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
41d696af8af3480f331da4e4a2fa8c74731a4d17206ce5c826e0b6e377528ed8
BLAKE2b-256 checksum
How to use checksums
9ae01bd2c569292cf9fdbb54d318ea9ec618dd2b3b6db599a271fbd8fe7d9650
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / hypha_launcher-0.1.3-py3-none-any.whl

Download URL hypha_launcher-0.1.3-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15a0eba1c90e44e22492af359140bf0505d347615b4606dbf58f696462300afa
BLAKE2b-256 checksum
How to use checksums
c176ce85c21bb6fec3e13639c74ee20ce7d8cd40283d432b7322ae90608a8dea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page