https://bytedance.github.io/SandboxFusion/
https://bytedance.github.io/SandboxFusion/
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://bytedance.github.io/SandboxFusion/
- Owner: bytedance
- License: apache-2.0
- Created: 2024-10-16T08:31:22.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-04T15:55:15.000Z (11 months ago)
- Last Synced: 2024-12-10T07:43:34.897Z (10 months ago)
- Language: Python
- Homepage: https://bytedance.github.io/SandboxFusion/
- Size: 9.55 MB
- Stars: 78
- Watchers: 2
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-Code-LLM - SandboxFusion
README
# Code Sandbox
A secure sandbox for running and judging code generated by LLMs.
Please view the complete documentation at https://bytedance.github.io/SandboxFusion/ .
## Table of Contents
- [Features](#features)
- [Cite](#cite)
- [Contributing](#contributing)
- [License](#license)## Features
**Code Runner**: Run and return the result of a code snippet
Supported languages:
- Python (python, pytest)
- C++
- C#
- Go (go, go test)
- Java (javac, junit)
- NodeJS
- Typescript (tsx, jest)
- Scala
- Kotlin
- PHP
- Rust
- Bash
- Lua
- R
- Perl
- D
- Ruby
- Julia
- Verilog
- CUDA (GPU)
- Python (GPU)Jupyter mode kernels:
- python3
**Online Judge**: Implementation of Evaluation & RL datasets that requires code running
- [HumanEval](https://github.com/openai/human-eval)
- [MultiPL-E HumanEval](https://github.com/nuprl/MultiPL-E)
- [Shadow Humaneval](https://huggingface.co/datasets/Miaosen/openai-humaneval-sky-shadow)
- [CodeContests](https://github.com/google-deepmind/code_contests)
- [MBPP](https://github.com/google-research/google-research/tree/master/mbpp)
- [MBXP](https://github.com/amazon-science/mxeval)
- [MHPP](https://github.com/SparksofAGI/MHPP)
- [CRUXEval](https://github.com/facebookresearch/cruxeval)
- [NaturalCodeBench](https://github.com/THUDM/NaturalCodeBench)
- [PAL-Math](https://github.com/deepseek-ai/DeepSeek-Coder/tree/main/Evaluation/PAL-Math)
- [verilog-eval](https://github.com/NVlabs/verilog-eval)## Cite
```
@misc{bytedanceseedfoundationcodeteam2025fullstackbenchevaluatingllms,
title={FullStack Bench: Evaluating LLMs as Full Stack Coders},
author={Bytedance-Seed-Foundation-Code-Team and : and Yao Cheng and Jianfeng Chen and Jie Chen and Li Chen and Liyu Chen and Wentao Chen and Zhengyu Chen and Shijie Geng and Aoyan Li and Bo Li and Bowen Li and Linyi Li and Boyi Liu and Jiaheng Liu and Kaibo Liu and Qi Liu and Shukai Liu and Siyao Liu and Tianyi Liu and Tingkai Liu and Yongfei Liu and Rui Long and Jing Mai and Guanghan Ning and Z. Y. Peng and Kai Shen and Jiahao Su and Jing Su and Tao Sun and Yifan Sun and Yunzhe Tao and Guoyin Wang and Siwei Wang and Xuwu Wang and Yite Wang and Zihan Wang and Jinxiang Xia and Liang Xiang and Xia Xiao and Yongsheng Xiao and Chenguang Xi and Shulin Xin and Jingjing Xu and Shikun Xu and Hongxia Yang and Jack Yang and Yingxiang Yang and Jianbo Yuan and Jun Zhang and Yufeng Zhang and Yuyu Zhang and Shen Zheng and He Zhu and Ming Zhu},
year={2025},
eprint={2412.00535},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2412.00535},
}
```## Contributing
### Installation
**Docker**
Build the image locally:
```bash
docker build -f ./scripts/Dockerfile.base -t code_sandbox:base .
# change the base image in Dockerfile.server
sed -i '1s/.*/FROM code_sandbox:base/' ./scripts/Dockerfile.server
docker build -f ./scripts/Dockerfile.server -t code_sandbox:server .
docker run -d --rm --privileged -p 8080:8080 code_sandbox:server make run-online
```**Manual**
Prerequisites: [conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html), [poetry](https://python-poetry.org/docs/#installation)
To install the sandbox service:
```bash
conda create -n sandbox -y python=3.12
conda activate sandbox
poetry install
# to build the real docs, run `cd docs && npm ci && npm run build`
mkdir -p docs/build
make run-online
```Please refer to `scripts/Dockerfile.base` for the runtime of each supported language, and `scripts/Dockerfile.server` for the installation of extra packages for python and nodejs.
For example, if you want to support execution of python code, you should install `install-python-runtime.sh`
```bash
cd runtime/python
bash install-python-runtime.sh
```
### Dev & TestRefer to installation section for the setup of development environment.
Run all unit tests:
```bash
make test
```Run a specific unit test (allows you to see stdout):
```bash
make test-case CASE=test_java_assert
```Run a specific unit test with pdb:
```bash
make test-case-pdb CASE=test_java_assert
```Format the code:
```bash
make format
```## License
```
Copyright 2024 Bytedance Ltd. and/or its affiliatesLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```## Contributors
sine
💻 🔣 🎨
Qi Liu
💻 🔣
Shulin.Xin
💻 🔣
可爱猫猫是梓喵
💻 🔣
Xingwen Li
🎨
aoyanli
💻 🔣
Magic Mai
💻 🔣