From 008bbc9f6d10cb78b677bf6029a5635d2276eb6e Mon Sep 17 00:00:00 2001 From: Nathan Freeman Date: Tue, 24 Oct 2023 18:25:09 -0500 Subject: [PATCH] debug entrypoint --- src/engine/src/core/tasks/executors/Function.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/engine/src/core/tasks/executors/Function.py b/src/engine/src/core/tasks/executors/Function.py index e63db753..b31d3464 100644 --- a/src/engine/src/core/tasks/executors/Function.py +++ b/src/engine/src/core/tasks/executors/Function.py @@ -238,19 +238,19 @@ def _setup_python_container(self): # NOTE Only supporting pip for now # Requirements file path inside the container - requirements_txt = os.path.join(self.task.container_work_dir, "src", requirements_filename) + requirements_txt = os.path.join(self.task.container_exec_dir, requirements_filename) # Entrypoint path inside the container - entrypoint_py = os.path.join(self.task.container_work_dir, "src", entrypoint_filename) + entrypoint_py = os.path.join(self.task.container_exec_dir, entrypoint_filename) # The output file for the install logs inside the container - dot_install = os.path.join(self.task.container_work_dir, "output", ".install") + dot_install = os.path.join(self.task.container_output_dir, ".install") # stderr path inside the container - stderr = os.path.join(self.task.container_work_dir, "output", STDERR) + stderr = os.path.join(self.task.container_output_dir, STDERR) # .stdout path inside the container - stdout = os.path.join(self.task.container_work_dir, "output", STDOUT) + stdout = os.path.join(self.task.container_output_dir, STDOUT) install_cmd = "" if has_packages: @@ -262,7 +262,8 @@ def _setup_python_container(self): owe_python_sdk_local_path = os.path.join(self.task.work_dir, "src/owe_python_sdk") shutil.copytree(OWE_PYTHON_SDK_DIR, owe_python_sdk_local_path, dirs_exist_ok=True) - entrypoint_cmd = f"python3 {entrypoint_py} 2> {stderr} 1> {stdout}" + # entrypoint_cmd = f"python3 {entrypoint_py} 2> {stderr} 1> {stdout}" + entrypoint_cmd = f"python3" args = [f"{install_cmd} {entrypoint_cmd}"] return ContainerDetails(