@@ -57,6 +57,8 @@ class SlurmScriptTemplate(TypedDict):
5757 Commands for container setup
5858 imports : str
5959 Import statements and source commands
60+ bind_path : str
61+ Bind path environment variable for the container
6062 container_command : str
6163 Template for container execution command
6264 activate_venv : str
@@ -74,7 +76,7 @@ class SlurmScriptTemplate(TypedDict):
7476 shebang : ShebangConfig
7577 container_setup : list [str ]
7678 imports : str
77- container_env_vars : list [ str ]
79+ bind_path : str
7880 container_command : str
7981 activate_venv : str
8082 server_setup : ServerSetupConfig
@@ -96,10 +98,8 @@ class SlurmScriptTemplate(TypedDict):
9698 f"{ CONTAINER_MODULE_NAME } exec { IMAGE_PATH } ray stop" ,
9799 ],
98100 "imports" : "source {src_dir}/find_port.sh" ,
99- "container_env_vars" : [
100- f"export { CONTAINER_MODULE_NAME .upper ()} _BINDPATH=${ CONTAINER_MODULE_NAME .upper ()} _BINDPATH,/dev,/tmp"
101- ],
102- "container_command" : f"{ CONTAINER_MODULE_NAME } exec --nv {{env_str}} --bind {{model_weights_path}}{{additional_binds}} --containall { IMAGE_PATH } \\ " ,
101+ "bind_path" : f"export { CONTAINER_MODULE_NAME .upper ()} _BINDPATH=${ CONTAINER_MODULE_NAME .upper ()} _BINDPATH,/dev,/tmp,{{model_weights_path}}{{additional_binds}}" ,
102+ "container_command" : f"{ CONTAINER_MODULE_NAME } exec --nv {{env_str}} --containall { IMAGE_PATH } \\ " ,
103103 "activate_venv" : "source {venv}/bin/activate" ,
104104 "server_setup" : {
105105 "single_node" : [
@@ -215,8 +215,8 @@ class BatchModelLaunchScriptTemplate(TypedDict):
215215 Shebang line for the script
216216 container_setup : list[str]
217217 Commands for container setup
218- env_vars : list[str]
219- Environment variables to set
218+ bind_path : list[str]
219+ Bind path environment variable for the container
220220 server_address_setup : list[str]
221221 Commands to setup the server address
222222 launch_cmd : list[str]
@@ -227,7 +227,7 @@ class BatchModelLaunchScriptTemplate(TypedDict):
227227
228228 shebang : str
229229 container_setup : str
230- env_vars : list [str ]
230+ bind_path : list [str ]
231231 server_address_setup : list [str ]
232232 write_to_json : list [str ]
233233 launch_cmd : list [str ]
@@ -237,9 +237,7 @@ class BatchModelLaunchScriptTemplate(TypedDict):
237237BATCH_MODEL_LAUNCH_SCRIPT_TEMPLATE : BatchModelLaunchScriptTemplate = {
238238 "shebang" : "#!/bin/bash\n " ,
239239 "container_setup" : f"{ CONTAINER_LOAD_CMD } \n " ,
240- "env_vars" : [
241- f"export { CONTAINER_MODULE_NAME } _BINDPATH=${ CONTAINER_MODULE_NAME } _BINDPATH,$(echo /dev/infiniband* | sed -e 's/ /,/g')"
242- ],
240+ "bind_path" : f"export { CONTAINER_MODULE_NAME .upper ()} _BINDPATH=${ CONTAINER_MODULE_NAME .upper ()} _BINDPATH,/dev,/tmp,{{model_weights_path}}{{additional_binds}}" ,
243241 "server_address_setup" : [
244242 "source {src_dir}/find_port.sh" ,
245243 "head_node_ip=${{SLURMD_NODENAME}}" ,
@@ -255,7 +253,7 @@ class BatchModelLaunchScriptTemplate(TypedDict):
255253 ' "$json_path" > temp_{model_name}.json \\ ' ,
256254 ' && mv temp_{model_name}.json "$json_path"\n ' ,
257255 ],
258- "container_command" : f"{ CONTAINER_MODULE_NAME } exec --nv --bind {{model_weights_path}}{{additional_binds}} -- containall { IMAGE_PATH } \\ " ,
256+ "container_command" : f"{ CONTAINER_MODULE_NAME } exec --nv --containall { IMAGE_PATH } \\ " ,
259257 "launch_cmd" : [
260258 "vllm serve {model_weights_path} \\ " ,
261259 " --served-model-name {model_name} \\ " ,
0 commit comments