diff --git a/compute_worker/compute_worker.py b/compute_worker/compute_worker.py index 573e72a94..87f320175 100644 --- a/compute_worker/compute_worker.py +++ b/compute_worker/compute_worker.py @@ -884,6 +884,9 @@ def _get_host_path(self, *paths): # Take our list of paths and smash 'em together path = os.path.join(*paths) + # Create if necessary + os.makedirs(path, exist_ok=True) + # pull front of path, which points to the location inside the container path = path[len(BASE_DIR) :] @@ -891,9 +894,6 @@ def _get_host_path(self, *paths): # can be seen properly path = os.path.join(HOST_DIRECTORY, path) - # Create if necessary - os.makedirs(path, exist_ok=True) - return path async def _run_program_directory(self, program_dir, kind):