Переглянути джерело

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>
Yufan Song 1 рік тому
батько
коміт
642e1b3cd0
2 змінених файлів з 25 додано та 0 видалено
  1. 24 0
      opendevin/README.md
  2. 1 0
      requirements.txt

+ 24 - 0
opendevin/README.md

@@ -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"
+```

+ 1 - 0
requirements.txt

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