Skip to content

Commit

Permalink
Merge pull request #580 from GATEOverflow/mlperf-inference
Browse files Browse the repository at this point in the history
Use absolute paths for docker mounts
  • Loading branch information
arjunsuresh authored Nov 21, 2024
2 parents b770ea4 + 539e4a8 commit 974fdbc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions script/run-docker-container/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,14 @@ def postprocess(i):
# return {'return': 1, 'error': 'Invalid mount {} specified'.format(mount_parts)}

host_mount = mount_parts[0]

if not os.path.exists(host_mount):
os.makedirs(host_mount)
if " " in host_mount and not host_mount.startswith('"'):
mount_cmds[i] = f"\"{host_mount}\":{mount_parts[1]}"

abs_host_mount = os.path.abspath(mount_parts[0])

if abs_host_mount != host_mount or " " in abs_host_mount and not host_mount.startswith('"'):
mount_cmds[i] = f"\"{abs_host_mount}\":{mount_parts[1]}"

mount_cmd_string = " -v " + " -v ".join(mount_cmds)
else:
Expand Down

0 comments on commit 974fdbc

Please sign in to comment.