You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: opendevin/runtime/client/README.md
+43-43Lines changed: 43 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,32 +7,66 @@ This README provides an overview of the OpenDevin Runtime, a crucial component o
7
7
8
8
The following sections dive deeper into these topics, providing a comprehensive understanding of the OpenDevin Runtime system.
9
9
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
+
10
42
## How the Runtime Image is Built
11
43
12
44
The OpenDevin runtime uses a layered approach for building Docker images:
13
45
14
46
1.**Original Image**: `ubuntu:22.04`
15
47
- This is the base image used for all subsequent layers.
- Built from local source code for development purposes.
24
58
25
59
### Build Process
26
60
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.
30
64
- This pre-built image is then used for running the OpenDevin environment.
31
65
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:
34
68
- 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`).
36
70
- Most dependencies are already installed in the Runtime Image, so this process mainly updates the code and any new dependencies.
37
71
- The rebuild process typically takes around 10 seconds, allowing for quick iterations during development.
38
72
@@ -72,39 +106,5 @@ The Runtime Client is a crucial component of the OpenDevin system, responsible f
72
106
- All actions are executed within the confined Docker environment, providing a sandbox for safe execution.
73
107
74
108
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.
76
110
- 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