File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -122,14 +122,13 @@ def _generate_multinode_script(self) -> str:
122122singularity exec $SINGULARITY_IMAGE ray stop
123123""" )
124124
125- cluster_setup .append (f"""nodes=$(scontrol show hostnames "${{ SLURM_JOB_NODELIST}} ")
126- nodes_array=(${{ nodes}} )
125+ cluster_setup .append (f"""nodes=$(scontrol show hostnames "$SLURM_JOB_NODELIST")
126+ nodes_array=($nodes)
127127
128128head_node=${{nodes_array[0]}}
129129head_node_ip=$(srun --nodes=1 --ntasks=1 -w "$head_node" hostname --ip-address)
130130
131131head_node_port=$(find_available_port $head_node_ip 8080 65535)
132- vllm_port_number=$(find_available_port $head_node_ip 8080 65535)
133132
134133ip_head=$head_node_ip:$head_node_port
135134export ip_head
@@ -159,7 +158,11 @@ def _generate_multinode_script(self) -> str:
159158 sleep 5
160159done
161160
162- SERVER_ADDR="http://$head_node_ip:$vllm_port_number/v1"
161+
162+ vllm_port_number=$(find_available_port $head_node_ip 8080 65535)
163+
164+
165+ SERVER_ADDR="http://${{head_node_ip}}:${{vllm_port_number}}/v1"
163166echo "Server address: $SERVER_ADDR"
164167
165168JSON_PATH="{ self .params ['log_dir' ]} /{ self .params ['model_name' ]} .$SLURM_JOB_ID/{ self .params ['model_name' ]} .$SLURM_JOB_ID.json"
You can’t perform that action at this time.
0 commit comments