OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

fix(sandbox): `mount_dir` for ssh_box

Open xingyaoww opened this issue 1 year ago • 1 comments

The default for WORKSPACE_MOUNT_PATH is None, which causes issues when try to map it into SSHBox. Right now, SSHBox first read for WORKSPACE_MOUNT_PATH then WORKSPACE_BASE.

Based on our README.md, it seems to me that both of these variable means the same thing. Can we merge them together into one variable (i.e., we keep WORKSPACE_MOUNT_PATH and remove WORKSPACE_BASE)?

...
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
...

xingyaoww avatar Apr 24 '24 09:04 xingyaoww

I think it might be good to move this logic to config.py--if WORKSPACE_MOUNT_PATH is unset, set it to WORKSPACE_BASE

I believe the logic you have here only works if running outside docker--inside docker it would probably break (though both variables should be set in that case)

rbren avatar Apr 24 '24 13:04 rbren

Good point! I have moved the code to config.py!

xingyaoww avatar Apr 24 '24 14:04 xingyaoww

Thanks!

rbren avatar Apr 24 '24 16:04 rbren