Skip to content

Commit 9503bda

Browse files
authored
Update the sandbox pre-installed package and sandbox timeout (#104)
1 parent bf2d75f commit 9503bda

File tree

5 files changed

+9
-26
lines changed

5 files changed

+9
-26
lines changed

alias/src/alias/agent/agents/_data_science_agent.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
files_filter_pre_reply_hook,
3232
add_ds_specific_tool,
3333
set_run_ipython_cell,
34-
install_package,
3534
)
3635
from .ds_agent_utils.ds_config import PROMPT_DS_BASE_PATH
3736

@@ -70,7 +69,6 @@ def __init__(
7069
state_saving_dir=state_saving_dir,
7170
)
7271

73-
install_package(self.toolkit.sandbox)
7472
set_run_ipython_cell(self.toolkit.sandbox)
7573

7674
self.uploaded_files: List[str] = []

alias/src/alias/agent/agents/ds_agent_utils/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
model_call_with_retry,
66
set_run_ipython_cell,
77
get_prompt_from_file,
8-
install_package,
98
)
109
from .ds_toolkit import add_ds_specific_tool
1110
from .prompt_selector import LLMPromptSelector
@@ -19,7 +18,6 @@
1918
"model_call_with_retry",
2019
"get_prompt_from_file",
2120
"set_run_ipython_cell",
22-
"install_package",
2321
"add_ds_specific_tool",
2422
"LLMPromptSelector",
2523
"files_filter_pre_reply_hook",

alias/src/alias/agent/agents/ds_agent_utils/utils.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,3 @@ def set_run_ipython_cell(sandbox):
9595
print(
9696
sandbox.call_tool("run_ipython_cell", {"code": summarize_chart_code}),
9797
)
98-
99-
100-
def install_package(sandbox):
101-
pkgs = [
102-
# "pandas",
103-
# "matplotlib",
104-
# "numpy",
105-
# "seaborn",
106-
# "scipy",
107-
# "scikit-learn",
108-
"agentscope",
109-
"qdrant-client",
110-
]
111-
command = f"pip install {' '.join(pkgs)}"
112-
sandbox.call_tool(
113-
name="run_shell_command",
114-
arguments={"command": command},
115-
)

alias/src/alias/runtime/alias_sandbox/box/config/nginx.conf.template

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ worker_processes 1;
33
events { worker_connections 1024; }
44

55
http {
6+
proxy_connect_timeout 120s;
7+
proxy_send_timeout 120s;
8+
proxy_read_timeout 120s;
69
include /etc/nginx/mime.types;
710
default_type application/octet-stream;
811

@@ -40,4 +43,4 @@ http {
4043
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
4144
}
4245
}
43-
}
46+
}
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
ipython==8.31.0
22
fastapi==0.115.6
33
uvicorn==0.34.0
4-
pydantic==2.10.5
4+
pydantic==2.12.5
55
requests==2.32.3
6-
mcp==1.9.0
6+
mcp==1.25.0
77
aiofiles
88
uv
99
gitpython
@@ -13,4 +13,6 @@ pandas
1313
scikit-learn
1414
scipy
1515
seaborn
16-
matplotlib
16+
matplotlib
17+
agentscope[full]==1.0.11
18+
qdrant-client==1.15.1

0 commit comments

Comments
 (0)