Giter Site home page Giter Site logo

oldthreefeng / dify-sandbox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from langgenius/dify-sandbox

0.0 0.0 0.0 3.54 MB

A lightweight, fast, and secure code execution environment that supports multiple programming languages

Home Page: https://docs.dify.ai/development/backend/sandbox

License: Apache License 2.0

Shell 4.57% JavaScript 0.45% Python 3.76% C 4.40% Go 86.81%

dify-sandbox's Introduction

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

dify-sandbox's People

Contributors

yeuoly avatar dafang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.