diff --git a/compute_worker/compute_worker.py b/compute_worker/compute_worker.py index 147ed2d2f..37bfd15fd 100644 --- a/compute_worker/compute_worker.py +++ b/compute_worker/compute_worker.py @@ -925,6 +925,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(Settings.BASE_DIR):] @@ -932,9 +935,6 @@ def _get_host_path(self, *paths): # can be seen properly path = os.path.join(Settings.HOST_DIRECTORY, path) - # Create if necessary - os.makedirs(path, exist_ok=True) - return path async def _run_program_directory(self, program_dir, kind):