mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
wip: run tb2 and fix modal instantiation
This commit is contained in:
parent
3baafea380
commit
3befb9389f
7 changed files with 90 additions and 23 deletions
|
|
@ -458,6 +458,7 @@ def register_task_env_overrides(task_id: str, overrides: Dict[str, Any]):
|
|||
- modal_image: str -- Path to Dockerfile or Docker Hub image name
|
||||
- docker_image: str -- Docker image name
|
||||
- cwd: str -- Working directory inside the sandbox
|
||||
- add_python: str -- Python version for Modal's add_python (for images without python on PATH)
|
||||
|
||||
Args:
|
||||
task_id: The rollout's unique task identifier
|
||||
|
|
@ -584,7 +585,8 @@ def _create_environment(env_type: str, image: str, cwd: str, timeout: int,
|
|||
ssh_config: dict = None, container_config: dict = None,
|
||||
local_config: dict = None,
|
||||
task_id: str = "default",
|
||||
host_cwd: str = None):
|
||||
host_cwd: str = None,
|
||||
add_python: str = None):
|
||||
"""
|
||||
Create an execution environment for sandboxed command execution.
|
||||
|
||||
|
|
@ -682,6 +684,7 @@ def _create_environment(env_type: str, image: str, cwd: str, timeout: int,
|
|||
image=image, cwd=cwd, timeout=timeout,
|
||||
modal_sandbox_kwargs=sandbox_kwargs,
|
||||
persistent_filesystem=persistent, task_id=task_id,
|
||||
add_python=add_python,
|
||||
)
|
||||
|
||||
elif env_type == "daytona":
|
||||
|
|
@ -1057,6 +1060,7 @@ def terminal_tool(
|
|||
image = ""
|
||||
|
||||
cwd = overrides.get("cwd") or config["cwd"]
|
||||
add_python = overrides.get("add_python")
|
||||
default_timeout = config["timeout"]
|
||||
effective_timeout = timeout or default_timeout
|
||||
|
||||
|
|
@ -1133,6 +1137,7 @@ def terminal_tool(
|
|||
local_config=local_config,
|
||||
task_id=effective_task_id,
|
||||
host_cwd=config.get("host_cwd"),
|
||||
add_python=add_python,
|
||||
)
|
||||
except ImportError as e:
|
||||
return json.dumps({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue