@@ -122,14 +122,15 @@ def process_mounts(mounts, env, docker_settings, f_run_cmd, run_state):
122122
123123
124124def prepare_docker_inputs (input_params , docker_settings ,
125- script_path , run_stage = False ):
125+ script , run_stage , mlc ):
126126 """
127127 Prepares Docker-specific inputs such as Dockerfile path and runtime options.
128128
129129 Args:
130130 i: Input dictionary with user-specified overrides.
131131 docker_settings: Docker-specific settings from the script's metadata.
132- script_path: Path to the script being executed.
132+ script: Script being executed.
133+ mlc: MLC action object
133134
134135 Returns:
135136 Tuple with Docker inputs dictionary and Dockerfile path or None in case of an error.
@@ -171,7 +172,13 @@ def prepare_docker_inputs(input_params, docker_settings,
171172 docker_base_image = docker_inputs .get ('base_image' )
172173 docker_path = docker_inputs .get ('path' )
173174 if not docker_path :
174- docker_path = script_path
175+ script_meta = script .meta
176+ script_uid = script_meta ['uid' ]
177+ script_alias = script_meta .get ('alias' )
178+ folder_name = f"""{ script_alias } _{ script_uid [:5 ]} """
179+ docker_path = os .path .join (
180+ mlc .repos_path , 'local' , 'docker' , folder_name )
181+ # docker_path = os.getcwd()
175182 docker_filename_suffix = (
176183 docker_base_image .replace ('/' , '-' ).replace (':' , '-' )
177184 if docker_base_image else f"{ docker_inputs ['os' ]} _{ docker_inputs ['os_version' ]} "
0 commit comments