Spaces:
Running
Running
Update tests.py
Browse files
tests.py
CHANGED
@@ -108,6 +108,10 @@ def run(cmd, timeout_sec,forever_cmd):
|
|
108 |
child = pexpect.spawn("bash")
|
109 |
output=""
|
110 |
command="cd /app/code_interpreter/ && "+cmd
|
|
|
|
|
|
|
|
|
111 |
|
112 |
child.sendline('PROMPT_COMMAND="echo END"')
|
113 |
child.readline().decode()
|
@@ -291,8 +295,8 @@ def run_shell_command(cmd:str,forever_cmd:str) -> dict:
|
|
291 |
the `forever_cmd` parameter.
|
292 |
Important Environment Notes:
|
293 |
- The execution environment is **Alpine Linux**. Commands should be
|
294 |
-
compatible (e.g., `
|
295 |
-
- `sudo`
|
296 |
- Standard bash features like `&&`, `||`, pipes (`|`), etc., are supported.
|
297 |
- When installing python packages , add an argument --break-system-packages to the pip install command.
|
298 |
- The following npm packages are preinstalled: express ejs chart.js .Any additional packages can be installed with npm install command.
|
@@ -407,7 +411,7 @@ def scrape_websites(url_list:list,query:str) -> list:
|
|
407 |
|
408 |
if __name__ == "__main__":
|
409 |
# Initialize and run the server
|
410 |
-
Ngrok=pexpect.spawn('
|
411 |
Ngrok.sendline("ngrok http --url=suitable-liked-ibex.ngrok-free.app 1337")
|
412 |
Ngrok.readline().decode()
|
413 |
mcp.run(transport='stdio')
|
|
|
108 |
child = pexpect.spawn("bash")
|
109 |
output=""
|
110 |
command="cd /app/code_interpreter/ && "+cmd
|
111 |
+
child.sendline('su root')
|
112 |
+
print(child.readline().decode())
|
113 |
+
child.sendline('password')
|
114 |
+
print(child.readline().decode())
|
115 |
|
116 |
child.sendline('PROMPT_COMMAND="echo END"')
|
117 |
child.readline().decode()
|
|
|
295 |
the `forever_cmd` parameter.
|
296 |
Important Environment Notes:
|
297 |
- The execution environment is **Alpine Linux**. Commands should be
|
298 |
+
compatible (e.g., `apk add` instead of `apt-get install`).
|
299 |
+
- `sudo`is not supported and not required.
|
300 |
- Standard bash features like `&&`, `||`, pipes (`|`), etc., are supported.
|
301 |
- When installing python packages , add an argument --break-system-packages to the pip install command.
|
302 |
- The following npm packages are preinstalled: express ejs chart.js .Any additional packages can be installed with npm install command.
|
|
|
411 |
|
412 |
if __name__ == "__main__":
|
413 |
# Initialize and run the server
|
414 |
+
Ngrok=pexpect.spawn('bash')
|
415 |
Ngrok.sendline("ngrok http --url=suitable-liked-ibex.ngrok-free.app 1337")
|
416 |
Ngrok.readline().decode()
|
417 |
mcp.run(transport='stdio')
|