Files
FastGPT/projects/README.md
Archer 0c9e56c1ee Test sandbox (#4547)
* feat: python sandbox execute with a temporary file (#4464)

* change runPythonSandbox:
1. write code into a temp file in /tmp dir then run it
2. write sandbox python script into a tmp file then run it

* repair subProcess.py file does not generate in tmp dir

* Adjust the security policy to kill (#4546)

---------

Co-authored-by: Donald Yang <yjyangfan@gmail.com>
Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com>
2025-04-15 16:26:10 +08:00

746 B
Raw Blame History

目录说明

该目录为 FastGPT 主项目。

  • app fastgpt 核心应用。

  • sandbox 沙盒项目,用于运行工作流里的代码执行 需求python环境为python:3.11额外安装的包请于requirements.txt填写在运行时会读取安装。

    • 注意个别安装的包可能需要额外安装库如pandas需要安装libffi

    • 新加入python的包遇见超时或者权限拦截的问题(确定不是自己的语法问题)请进入docker容器内部执行以下指令

      docker exec -it 《替换成容器名》 /bin/bash
      chmod -x testSystemCall.sh
      bash ./testSystemCall.sh
    

    然后将新的数组替换或追加到src下sandbox的constants.py中的SYSTEM_CALLS数组即可