dify沙盒

非法操作 7f45f6df11 add workflow (#29) 1 year ago
.github 0210cc2ca4 fix: operation not permitted with python/amd64 (#8) 1 year ago
build b2833fe168 fix 1 year ago
cmd 49a1826eda add faq for 2 common issues and add tool to quickly figure out required syscalls (#17) 1 year ago
conf b564037413 fix 1 year ago
dependencies 62954e9c30 fix: amd64 1 year ago
docker 8db09abd13 fix open dependencies/python-requirements.txt: no such file or directory (#21) 1 year ago
internal 0210cc2ca4 fix: operation not permitted with python/amd64 (#8) 1 year ago
tests a57aa758c7 License (#9) 1 year ago
.gitignore 0c0c84cf46 init project 1 year ago
FAQ.md 49a1826eda add faq for 2 common issues and add tool to quickly figure out required syscalls (#17) 1 year ago
LICENSE a57aa758c7 License (#9) 1 year ago
README.md 7f45f6df11 add workflow (#29) 1 year ago
go.mod 54778029a9 feat: nodejs 1 year ago
go.sum 54778029a9 feat: nodejs 1 year ago
install.sh 91696da794 fix 1 year ago
workflow.png 7f45f6df11 add workflow (#29) 1 year ago

README.md

Dify-Sandbox

Introduction

Dify-Sandbox offers a simple way to run untrusted code in a secure environment. It is designed to be used in a multi-tenant environment, where multiple users can submit code to be executed. The code is executed in a sandboxed environment, which restricts the resources and system calls that the code can access.

Use

Requirements

DifySandbox currently only supports Linux, as it's designed for docker containers. It requires the following dependencies:

  • libseccomp
  • pkg-config
  • gcc
  • golang 1.20.6

Steps

  1. Clone the repository using git clone https://github.com/langgenius/dify-sandbox and navigate to the project directory.
  2. Run ./install.sh to install the necessary dependencies.
  3. Run ./build/build_[amd64|arm64].sh to build the sandbox binary.
  4. Run ./main to start the server.

If you want to debug the server, firstly use build script to build the sandbox library binaries, then debug as you want with your IDE.

FAQ

Refer to the FAQ document

Workflow

workflow