-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Files aren't visible to commands run in the SandBox in WSL in docker mode #1366
Comments
I think there might be a bug in the exec box--I've noticed something similar. |
What's strange is that if I run
everything is fine. I can run And I But for some reason, if I ask the agent to run |
Actually--I just pulled
|
I often encounter this problem, mostly because the session is in progress and the task is still executing. |
I used to have the same problem, but it seems to be working thanks to the latest commits and switching from ExecBox back to the default. |
Seems mounting inside a docker is not working in wsl. Here I gave a nonexistent directory in the host. Relevant GH issue abiosoft/colima#503 from slack Relevant issues: |
Title: Workspace is not mounted for Sandobx started by Docker |
I've worked around the problem with WSL by running this instead, using the volume feature from docker instead docker run -d --name opendevin
|
Docker desktop shows as mounted on sandbox but it is not. Did you test it? |
tl;dr: here's how you can help us debug this:
docker exec -it $APP_CONTAINER_ID ls -lah /opt/workspace_base
docker exec -it $SANDBOX_CONTAINER_ID ls -lah /workspace Here's how the filesystems are supposed to work:
comes from. So first good thing to check is that if you Next, when the sandbox starts, it mounts $WORKSPACE_MOUNT_PATH to
comes from. So next thing to check: if you Lastly, we have some API endpoints that return a list of files in the workspace. If the above two work fine, the problem is likely there. |
Seems it affects only WSL.. Actual workspace Seems the sandbox workspace is mounted to a different folder (inside the first container?). It's a persistent folder. Mount path Code #The directory you want OpenDevin to modify. MUST be an absolute path!
export WORKSPACE_BASE=$(pwd)/workspace;
docker run \
-it \
--pull=always \
-e SANDBOX_USER_ID=$(id -u) \
-e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
-v $WORKSPACE_BASE:/opt/workspace_base \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
ghcr.io/opendevin/opendevin:0.5 APP CONTAINER SANDOBX CONTAINER |
Like this, it may be a docker problem affecting Windows. |
@rbren Your OS? |
Is the best solution now is just use Ubuntu (VM or otherwise) instead of Ubuntu in WSL? |
Running natively would be best in terms of storage and memory. |
I'm tending to the same conclusion and might try a VM instead of WSL. Though I'm not sure if the issues I experience are more an issue with Docker and mounted volumes. |
@galakfryar could you test the commands again (CodeAct with Ollama on WSL) following this conversation? Not sure if "file in workspace" issue still lingers or not if it is just a volume flag issue. |
Not sure I can give a recommendation. Just from personal use, I have VirtualBox installed. There are plenty of images available for download, for pretty much every Linux distro, and it's free. |
The issue isn't reproducable right now. Closing for now. |
Am I missing something?
workspace not visible in sandbox, and therefore can't execute python scripts in sandbox.
I'm on Windows 10 and I'm running WSL2 Ubuntu image, with Docker Desktop (integration enabled).
Connected to WSL in VS Code, and there in the shell I'm running these commands as described in the README, with light adaptation, maybe it's some of the changes I made?
These two lines of the docker command are "none standard":
-e LLM_BASE_URL="https://api.groq.com/openai/v1/chat/completions" \ -e SANDBOX_TYPE=exec \
the SANDBOX_TYPE = exec is because I wasn't able to get rid of the sshd error that most of you should be familiar with these days.
After that I
I also tested to make some files in the working directory of the shell:
docker exec -it 4e0410591257 /bin/bash root@docker-desktop:/workspace# touch test.txt
when getting devin to run ls it does show that file:
also me trying to trick open devin into going into /opt/workspace_base didn't work as you can clearly see
But Devin as well successfully writes files in the specified workspace folder in the opendevin docker, and that shows as well in vscode, just the sandbox docker doesn't seem to be linking the correct folder, if any at all(?)
I've removed all WSL dockers multiple times, same within, have tried the 0.3.1 version of openDevin and the main. with multiple iterations of cleaning the dockers out and downloading the new ones.
I feel like if there would be more people with this basic issue there would be some issues here with this, but I don't seem to find them.
Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered: