Welcome to Codeinterpreter-Codebox, a cutting-edge cloud service tailored for executing Code Interpreter code.
- π― Key Features
- π‘ What Can You Do?
- π Related Projects & Their Differences
- π» Sample Codes
- π¦ Deployment
- π§ Contact
- π Independent Jupyter Sandbox Environment
A completely isolated Jupyter sandbox environment that supports state-preserving code execution. Supports file uploads and downloads. - π³ Dockerized One-click Deployment
- π Completely Free and Open Source
- π‘οΈ Information Security
Supports completely private deployments without the need to upload files to external servers. - π More Flexible
Supports the opening of more ports to achieve more custom functionality requirements, such as: connecting to databases, connecting to the internet, connecting to other servers.
- Execute Python code.
- Supports reading of uploaded files (Upload and Analyze Files).
if name=='main':
session=CodeinterpreterSession()
try:
session.upload_files(['./../data/test_data.csv'])
session.chat('How many columns are in the uploaded file?')
finally:
session.close()
- Supports downloading files from the sandbox.
- Supports dynamic scaling for commercial deployments.
- Supports custom feature modifications, open ports, network connections, etc., supports web crawlers.
Feature/Project | Codeinterpreter-Codeboxβ | Code Interpreter api | open-interpreter | E2B |
---|---|---|---|---|
Private Commercial Deployment | β | β | β | β |
Remote Invocation | β | β | β | β |
Fully Open Source | β | β | β | β |
Free of Charge | β | β | β | β |
Customization | β | β | β | β |
Information Security | β | β | β | β |
Multiple Programming Languages | β | β | β | β |
Local Execution | β | β | β | β |
Direct Invocation w/o Deployment | β | β | β | β |
β Indicates our project
- Server-Client Interaction: jupyter server communicate showcases the details of interaction between the server and the Jupyter container.
- Remote Execution: jupyter call demonstrates how to invoke a web service via an HTTP request, execute code, and retrieve results.
test_code="""
import docker
print(docker.version)
"""
execute(test_code)
#output
Execute Result= {"output_type":"text/plain","content":"6.1.3\n","files":null}
- Client Session Demonstration: client session invocation shows how to allow LLM to invoke and execute code in a project through session and HTTP request.
session=CodeinterpreterSession()
try:
session.upload_files(['./../data/test_data.csv'])
session.chat('How many columns are in the uploaded file?')
finally:
session.close()
- Install Docker
Linux: Install Docker by terminal
Mac os: Install Docker desktop for mac
Windows: Install Docker desktop for windows - Modify Docker config file
Head over to docker compose and substitute 'CODEBOX_ROOT_PATH' and 'YOUR_MNT_PATH:/codebox' with your file path to mount 'YOUR_MNT_PATH'. - Launch server
- Build custom jupyter image
cd docker
docker build -t scipy-notebook:custom -f Dockerfile .
- Build web server image
cd app
docker-compose -f docker_dev.yml build
- Launch server
docker-compose -f docker_dev.yml up
WeChat: zjajzzj1996
Email: zhangzhehian@gmail.com