OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: Fix for WSL2 issue sharing files between container and host machine.

Open NateUE opened this issue 1 year ago • 1 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Describe the bug and reproduction steps

I'd like to recommend a slight change to the Connecting to your filesystem section of the setup docs.

The existing one looks like this. The first line with /path/to/your/code is a bit vague. I believe this may be resulting in some issues people are having with WSL2 on Windows.

export WORKSPACE_BASE=/path/to/your/code

docker run # ...
    -e SANDBOX_USER_ID=$(id -u) \
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
    # ...

I believe something like this would be easier to understand.

export WORKSPACE_BASE=/path/to/your/code
# Examples
#
# Linux and Mac
# export WORKSPACE_BASE=$HOME/OpenHands
# Will set $WORKSPACE_BASE to /home/'username'/OpenHands
#
# WSL2 on Windows
# export WORKSPACE_BASE=/mnt/c/dev/OpenHands
# Will set $WORKSPACE_BASE to C:\dev\OpenHands


docker run # ...
    -e SANDBOX_USER_ID=$(id -u) \
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
    # ...

OpenHands Installation

Docker command in README

OpenHands Version

0.14

Operating System

WSL on Windows

Logs, Errors, Screenshots, and Additional Context

No response

NateUE avatar Nov 19 '24 16:11 NateUE