diff --git a/README.md b/README.md index 2c39bb15..9b75775d 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,9 @@ Select model config and click continue. ![Node join](docs/images/node-join.png) This page will show the join command like blow. ```sh +# local area network env +parallax join +# public network env parallax join -s {scheduler-address} # example parallax join -s /ip4/192.168.1.2/tcp/5001/p2p/xxxxxxxxxxxx @@ -136,6 +139,9 @@ Please notice and record the scheduler ip4 address generated in the terminal. #### Step 2: Join each distributed nodes For each distributed nodes including the main node, open a terminal and join the server with the scheduler address. ```sh +# local area network env +parallax join +# public network env parallax join -s {scheduler-address} ``` For example: diff --git a/scripts/README.md b/scripts/README.md deleted file mode 100755 index a811cd9b..00000000 --- a/scripts/README.md +++ /dev/null @@ -1,25 +0,0 @@ -## Usage example - -### Step 1: Launch scheduler -First launch our scheduler on the main node. -```sh -parallax run -m {model-name} -n {number-of-worker-nodes} -``` -For example: -```sh -parallax run -m Qwen/Qwen3-0.6B -n 2 -``` -Please notice and record the scheduler ip4 address generated in the terminal. - -### Step 2: Join each distributed nodes -For each distributed nodes including the main node, open a terminal and join the server with the scheduler address. -```sh -parallax join -s {scheduler-address} -``` -For example: -```sh -# first node -parallax join -s /ip4/192.168.1.1/tcp/5001/p2p/xxxxxxxxxxxx -# second node -parallax join -s /ip4/192.168.1.1/tcp/5001/p2p/xxxxxxxxxxxx -``` diff --git a/scripts/join.sh b/scripts/join.sh index d5553011..b3bb7203 100755 --- a/scripts/join.sh +++ b/scripts/join.sh @@ -8,12 +8,14 @@ fi helpFunction() { echo "" - echo "Usage: $0 -s SCHEDULER_ADDR" - echo -e "\t-s Description of what is SCHEDULER_ADDR" + echo "Usage: $0 [-s SCHEDULER_ADDR]" + echo -e "\t-s SCHEDULER_ADDR (default: auto)" exit 1 # Exit script after printing help } -while getopts "s:m:i:" opt +SCHEDULER_ADDR="auto" + +while getopts "s:" opt do case "$opt" in s ) SCHEDULER_ADDR="$OPTARG" ;; @@ -24,11 +26,9 @@ done # Print helpFunction in case parameters are empty if [ -z "$SCHEDULER_ADDR" ] then - echo "Some or all of the parameters are empty"; - helpFunction + SCHEDULER_ADDR="auto" fi -# Begin script in case all parameters are correct echo "$SCHEDULER_ADDR" export SGL_ENABLE_JIT_DEEPGEMM=0 diff --git a/src/backend/server/static_config.py b/src/backend/server/static_config.py index 4d9b92fc..85427cab 100644 --- a/src/backend/server/static_config.py +++ b/src/backend/server/static_config.py @@ -29,7 +29,7 @@ "nvidia/Llama-3.1-8B-Instruct-FP8", ] -NODE_JOIN_COMMAND_LOCAL_NETWORK = """parallax join -s {scheduler_addr}""" +NODE_JOIN_COMMAND_LOCAL_NETWORK = """parallax join""" NODE_JOIN_COMMAND_PUBLIC_NETWORK = """parallax join -s {scheduler_addr}""" diff --git a/src/parallax/cli.py b/src/parallax/cli.py index 2f292a00..1c5420f9 100644 --- a/src/parallax/cli.py +++ b/src/parallax/cli.py @@ -151,7 +151,7 @@ def main(): "join", help="Join a distributed cluster (equivalent to scripts/join.sh)" ) join_parser.add_argument( - "-s", "--scheduler-addr", type=str, help="Scheduler address (required)" + "-s", "--scheduler-addr", default="auto", type=str, help="Scheduler address (required)" ) args = parser.parse_args()