Skip to content

Commit b5d3fca

Browse files
authored
[docs] Update README.md for new OpenDevin Runtime (OpenHands#3142)
* Update README.md * address comment * remove DEBUG flag
1 parent a29c795 commit b5d3fca

1 file changed

Lines changed: 43 additions & 43 deletions

File tree

opendevin/runtime/client/README.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,66 @@ This README provides an overview of the OpenDevin Runtime, a crucial component o
77

88
The following sections dive deeper into these topics, providing a comprehensive understanding of the OpenDevin Runtime system.
99

10+
## Architecture Diagram
11+
12+
```
13+
+-------------------+ +-------------------+
14+
| OpenDevin | | Docker Host |
15+
| Backend | | |
16+
| | | +-------------+ |
17+
| +-------------+ | | | Runtime | |
18+
| | EventStream | | | | Container | |
19+
| | Runtime |<-|-----|->| | |
20+
| +-------------+ | | | +-------+ | |
21+
| | | | |Runtime| | |
22+
| | | | |Client | | |
23+
| | | | +-------+ | |
24+
| | | | | | |
25+
| | | | +-------+ | |
26+
| | | | |Plugins| | |
27+
| | | | +-------+ | |
28+
| | | +-------------+ |
29+
+-------------------+ +-------------------+
30+
```
31+
32+
This diagram illustrates the high-level architecture of the OpenDevin Runtime system:
33+
34+
1. The OpenDevin Backend communicates with the Docker Host through the EventStreamRuntime.
35+
2. The Docker Host runs a Runtime Container, which includes:
36+
- The Runtime Client: Handles incoming actions and generates observations.
37+
- Plugins: Extend the functionality of the Runtime Client.
38+
3. The Runtime Client executes actions within the sandboxed environment of the Docker container.
39+
40+
This architecture ensures a secure and flexible environment for executing AI-driven development tasks, allowing OpenDevin to execute a wide range of actions safely and efficiently.
41+
1042
## How the Runtime Image is Built
1143

1244
The OpenDevin runtime uses a layered approach for building Docker images:
1345

1446
1. **Original Image**: `ubuntu:22.04`
1547
- This is the base image used for all subsequent layers.
1648

17-
2. **Runtime Image**: `od_runtime:ubuntu__22.04`
49+
2. **Runtime Image**: `od_runtime:od_v{OPENDEVIN_VERSION}_image_ubuntu__22.04`
50+
51+
Example image name: `od_runtime:od_v0.8.1_image_ubuntu__22.04`
1852
- Built from the stable release of OpenDevin.
1953
- This is the primary runtime image that users will interact with.
2054
- Created by copying all OpenDevin code into the original image and installing dependencies using Poetry.
2155

22-
3. **Dev Runtime Image**: `od_runtime_dev:ubuntu__22.04`
56+
1. **Dev Runtime Image**: `od_runtime_dev:od_v{OPENDEVIN_VERSION}_image_ubuntu__22.04`
2357
- Built from local source code for development purposes.
2458

2559
### Build Process
2660

27-
#### Production Build (DEBUG=false)
28-
By default, when DEBUG is set to false, the build process only needs to run once:
29-
- The Runtime Image (`od_runtime:ubuntu__22.04`) is created by copying OpenDevin code into the original Ubuntu image and installing all dependencies.
61+
#### Production Build (if environment variable `SANDBOX_UPDATE_SOURCE_CODE` is not set)
62+
By default, when `SANDBOX_UPDATE_SOURCE_CODE` is unset OR set to false, the build process only needs to run once:
63+
- The Runtime Image (`od_runtime:od_v{OPENDEVIN_VERSION}_image_ubuntu__22.04`) is created by copying OpenDevin code into the original Ubuntu image and installing all dependencies.
3064
- This pre-built image is then used for running the OpenDevin environment.
3165

32-
#### Development Build (DEBUG=true)
33-
When developing or modifying code that runs inside the container, you can set DEBUG=true to enable a more dynamic build process:
66+
#### Development Build (env var `SANDBOX_UPDATE_SOURCE_CODE=True`)
67+
When developing or modifying code that runs inside the container, you can set env var `SANDBOX_UPDATE_SOURCE_CODE=True` to enable a more dynamic build process:
3468
- Every time you run the code, the existing image will be updated with the latest changes.
35-
- The Dev Runtime Image (`od_runtime_dev:ubuntu__22.04`) is rebuilt from the Runtime Image (`od_runtime:ubuntu__22.04`).
69+
- The Dev Runtime Image (`od_runtime_dev:od_v{OPENDEVIN_VERSION}_image_ubuntu__22.04`) is rebuilt from the Runtime Image (`od_runtime:od_v{OPENDEVIN_VERSION}_image_ubuntu__22.04`).
3670
- Most dependencies are already installed in the Runtime Image, so this process mainly updates the code and any new dependencies.
3771
- The rebuild process typically takes around 10 seconds, allowing for quick iterations during development.
3872

@@ -72,39 +106,5 @@ The Runtime Client is a crucial component of the OpenDevin system, responsible f
72106
- All actions are executed within the confined Docker environment, providing a sandbox for safe execution.
73107

74108
8. **Flexibility**:
75-
- The system supports both production (DEBUG=false) and development (DEBUG=true) modes.
109+
- The system supports both production (`SANDBOX_UPDATE_SOURCE_CODE=False`) and development (`SANDBOX_UPDATE_SOURCE_CODE=True`) modes.
76110
- In development mode, the runtime image can be updated with the latest code changes for testing and debugging.
77-
78-
79-
80-
## Architecture Diagram
81-
82-
```
83-
+-------------------+ +-------------------+
84-
| OpenDevin | | Docker Host |
85-
| Backend | | |
86-
| | | +-------------+ |
87-
| +-------------+ | | | Runtime | |
88-
| | EventStream | | | | Container | |
89-
| | Runtime |<-|-----|->| | |
90-
| +-------------+ | | | +-------+ | |
91-
| | | | |Runtime| | |
92-
| | | | |Client | | |
93-
| | | | +-------+ | |
94-
| | | | | | |
95-
| | | | +-------+ | |
96-
| | | | |Plugins| | |
97-
| | | | +-------+ | |
98-
| | | +-------------+ |
99-
+-------------------+ +-------------------+
100-
```
101-
102-
This diagram illustrates the high-level architecture of the OpenDevin Runtime system:
103-
104-
1. The OpenDevin Backend communicates with the Docker Host through the EventStreamRuntime.
105-
2. The Docker Host runs a Runtime Container, which includes:
106-
- The Runtime Client: Handles incoming actions and generates observations.
107-
- Plugins: Extend the functionality of the Runtime Client.
108-
3. The Runtime Client executes actions within the sandboxed environment of the Docker container.
109-
110-
This architecture ensures a secure and flexible environment for executing AI-driven development tasks, allowing OpenDevin to execute a wide range of actions safely and efficiently.

0 commit comments

Comments
 (0)