Open neubig opened 2 hours ago
Thanks @x66ccff, I opened a separate issue so we can track this.
Just to clarify, are you following our custom sandbox guide? https://docs.all-hands.dev/modules/usage/how-to/custom-sandbox-guide
And also, is your use case that you would like to develop programs with CUDA+PyTorch? I'm just trying to better understand the situation so we can recommend the easiest way to fix the issue.
Just to clarify, are you following our custom sandbox guide? https://docs.all-hands.dev/modules/usage/how-to/custom-sandbox-guide
hmm, i didnt use the config.toml
in the entire process. i m not sure whether it is correct. I just make a new docker image use the dockerfile above and then use this to start the openhands.
Seems editing config.toml
is only necessary when build from source? not docker?
docker run -it --pull=always
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=kk-openhands-pytorch
-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
--name openhands-app-$(date +%Y%m%d%H%M%S)
ghcr.io/all-hands-ai/openhands:0.9
And also, is your use case that you would like to develop programs with CUDA+PyTorch? I'm just trying to better understand the situation so we can recommend the easiest way to fix the issue.
Yeah, but I'm not very familiar with Docker. Any advice would be appreciated!
OK, I think that there might be an easier way for you to do this. Specifically, you could probably start working directly from one of the official pytorch docker images. You can pick which one best matches your expected version of PyTorch and do something like the following:
docker run -it --pull=always
-e SANDBOX_BASE_CONTAINER_IMAGE=pytorch/pytorch:2.4.1-cuda11.8-cudnn9-runtime
-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
--name openhands-app-$(date +%Y%m%d%H%M%S)
ghcr.io/all-hands-ai/openhands:0.9
Note that I changed SANDBOX_RUNTIME_CONTAINER_IMAGE
to SANDBOX_BASE_CONTAINER_IMAGE
, which will allow OpenHands to install its necessary software on top of the base image.
That may just work for your purposes, but if you still have issues I can help!
the bug is, if you install anaconda in the image (using docker). the agent will need to exec
conda init
first. theconda init
command require the user toclose
the terminal, however, the agent can not close it. so i try to let the agent execsource ./bashrc
. Then, it stucksOriginally posted by @x66ccff in https://github.com/All-Hands-AI/OpenHands/issues/2178#issuecomment-2395448086