diff --git a/opendevin/README.md b/opendevin/README.md index 486e408923..f7ce326723 100644 --- a/opendevin/README.md +++ b/opendevin/README.md @@ -16,3 +16,27 @@ It will map `./workspace` into the docker container with the folder permission c Example screenshot: image + + +## How to run + +1. Build the sandbox image local. If you want to use specific image tags, please also fix the variable in code, in code default image tag is `latest`. +```bash +docker build -f opendevin/sandbox/Dockerfile -t opendevin/sandbox:v0.1 . +``` + +2. Set the `OPENAI_API_KEY`, please find more details [here](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety). Also, choose the model you want. Default is `gpt-4-0125-preview` +```bash +export OPENAI_API_KEY=xxxxxxx +``` + +3. Install the requirement package. +```bash +pip install -r requirement.txt +``` +If you still meet problem like `ModuleNotFoundError: No module named 'agenthub'`, try to add the `opendevin` root path into `PATH` env. + +4. Run following cmd to start. +```bash +PYTHONPATH=`pwd` python ./opendevin/main.py -d ./workspace -t "write a bash script that prints hello world" +``` diff --git a/requirements.txt b/requirements.txt index 5cd5e2e62b..a012a665b9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ uvicorn[standard] # for agenthub/lanchangs_agent langchain +langchain-core langchain-openai langchain-community llama-index