wip: run tb2 and fix modal instantiation

This commit is contained in:
alt-glitch 2026-04-01 16:55:03 -07:00
parent 3baafea380
commit 3befb9389f
7 changed files with 90 additions and 23 deletions

View file

@ -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({