Skip to content

Commit 2c1276a

Browse files
authored
Merge pull request #2311 from jbehley/fix_host_path
Fixing bug with different HOST_DIRECTORY
2 parents 1ad888d + 845cf79 commit 2c1276a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compute_worker/compute_worker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -925,16 +925,16 @@ def _get_host_path(self, *paths):
925925
# Take our list of paths and smash 'em together
926926
path = os.path.join(*paths)
927927

928+
# Create if necessary
929+
os.makedirs(path, exist_ok=True)
930+
928931
# pull front of path, which points to the location inside the container
929932
path = path[len(Settings.BASE_DIR):]
930933

931934
# add host to front, so when we run commands in the container on the host they
932935
# can be seen properly
933936
path = os.path.join(Settings.HOST_DIRECTORY, path)
934937

935-
# Create if necessary
936-
os.makedirs(path, exist_ok=True)
937-
938938
return path
939939

940940
async def _run_program_directory(self, program_dir, kind):

0 commit comments

Comments
 (0)