mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix(sandbox): mount_dir for ssh_box (#1333)
* fix mount_dir for ssh_box * move logic to config.py
This commit is contained in:
parent
2268529b75
commit
e6ecbd5510
@ -134,6 +134,9 @@ def finalize_config():
|
||||
parts = config[ConfigType.WORKSPACE_MOUNT_REWRITE].split(':')
|
||||
config[ConfigType.WORKSPACE_MOUNT_PATH] = base.replace(parts[0], parts[1])
|
||||
|
||||
if config.get(ConfigType.WORKSPACE_MOUNT_PATH) is None:
|
||||
config[ConfigType.WORKSPACE_MOUNT_PATH] = config.get(ConfigType.WORKSPACE_BASE)
|
||||
|
||||
|
||||
finalize_config()
|
||||
|
||||
|
||||
@ -373,8 +373,8 @@ class DockerSSHBox(Sandbox):
|
||||
)
|
||||
)
|
||||
|
||||
mount_dir = config.get('WORKSPACE_MOUNT_PATH')
|
||||
print('Mounting workspace directory: ', mount_dir)
|
||||
mount_dir = config.get(ConfigType.WORKSPACE_MOUNT_PATH)
|
||||
logger.info(f'Mounting workspace directory: {mount_dir}')
|
||||
# start the container
|
||||
self.container = self.docker_client.containers.run(
|
||||
self.container_image,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user