mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
local sandbox: Create workspace base during init (#1377)
This commit is contained in:
6
.github/workflows/run-integration-tests.yml
vendored
6
.github/workflows/run-integration-tests.yml
vendored
@@ -48,6 +48,12 @@ jobs:
|
||||
agent: "CodeActAgent"
|
||||
embedding-model: "none"
|
||||
sandbox: "exec"
|
||||
- name: MonologueAgent-py311-local
|
||||
python-version: "3.11"
|
||||
agent: "MonologueAgent"
|
||||
embedding-model: "local"
|
||||
# sufficient to have one agent testing against local sandbox
|
||||
sandbox: "local"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import subprocess
|
||||
import atexit
|
||||
import os
|
||||
from typing import Tuple, Dict
|
||||
from opendevin.sandbox.sandbox import Sandbox
|
||||
from opendevin.sandbox.process import Process
|
||||
@@ -25,6 +26,7 @@ from opendevin.schema.config import ConfigType
|
||||
|
||||
class LocalBox(Sandbox):
|
||||
def __init__(self, timeout: int = 120):
|
||||
os.makedirs(config.get(ConfigType.WORKSPACE_BASE), exist_ok=True)
|
||||
self.timeout = timeout
|
||||
self.background_commands: Dict[int, Process] = {}
|
||||
self.cur_background_id = 0
|
||||
|
||||
Reference in New Issue
Block a user