Add cross-platform Python launcher (launch.py) as alternative to start_all.sh#23
Open
user3868 wants to merge 1 commit intoOpenBMB:mainfrom
Open
Add cross-platform Python launcher (launch.py) as alternative to start_all.sh#23user3868 wants to merge 1 commit intoOpenBMB:mainfrom
user3868 wants to merge 1 commit intoOpenBMB:mainfrom
Conversation
…t_all.sh - Pure Python, no bash required; works on Linux, macOS and Windows (WSL/native) - Reads service ports from config.json (same source as start_all.sh via config.py) - Supports --gpus, --http, --python, --stop and --worker-timeout flags - Streams colored real-time output from each worker and the gateway - Waits for model_loaded=true in /health response before starting the gateway - Saves PIDs to tmp/launch.pids for clean shutdown via --stop or Ctrl-C
Collaborator
|
Hello @user3868 , thank you for this PR! I think it's very helpful and easy-to-understand, and I will test it on my linux server, after that I will merge this PR. Thank you! 🤗 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
start_all.shrelies on bash, which does not work on Windows natively and can fail in certain WSL configurations. This PR addslaunch.py, a pure-Python alternative that works on Linux, macOS, and Windows (WSL or native) with no extra dependencies beyond the standard library.What this PR adds
launch.py— a single-file Python launcher requiring no additional dependenciesgateway_portandworker_base_portfromconfig.json, consistent withstart_all.shmodel_loaded: truein each worker's/healthresponse before starting the gateway (same logic asstart_all.sh)tmp/launch.pidsfor clean shutdown via--stopor Ctrl-CUsage
CLI options
--gpusCUDA_VISIBLE_DEVICESor0--http--python--worker-timeout600--stopTested on