doc(sandbox): add more instructions for starting on sandbox work (#107)

* add doc

* fix

* remove requirement

* Update opendevin/README.md

Co-authored-by: Robert Brennan <accounts@rbren.io>

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
This commit is contained in:
Yufan Song 2024-03-23 14:44:48 -07:00 committed by GitHub
parent a2f245e2fe
commit 642e1b3cd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 0 deletions

View File

@ -16,3 +16,27 @@ It will map `./workspace` into the docker container with the folder permission c
Example screenshot:
<img width="868" alt="image" src="https://github.com/OpenDevin/OpenDevin/assets/38853559/8dedcdee-437a-4469-870f-be29ca2b7c32">
## 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"
```

View File

@ -9,6 +9,7 @@ uvicorn[standard]
# for agenthub/lanchangs_agent
langchain
langchain-core
langchain-openai
langchain-community
llama-index