mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Allow workspace_mount_path to use relative paths (#9615)
Co-authored-by: jianchuanli <jianchuanli@langcode.com> Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
This commit is contained in:
@@ -261,7 +261,8 @@ class DockerRuntime(ActionExecutionClient):
|
||||
mount_mode = 'rw' # Default mode
|
||||
|
||||
# e.g. result would be: {"/home/user/openhands/workspace": {'bind': "/workspace", 'mode': 'rw'}}
|
||||
volumes[self.config.workspace_mount_path] = {
|
||||
# Add os.path.abspath() here so that relative paths can be used when workspace_mount_path is configured in config.toml
|
||||
volumes[os.path.abspath(self.config.workspace_mount_path)] = {
|
||||
'bind': self.config.workspace_mount_path_in_sandbox,
|
||||
'mode': mount_mode,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user