Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandbox to execute gorilla output code #165

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Yushgoel
Copy link

The goal of this feature is to allow the user to run the code outputted by Gorilla (Row #26 on the spreadsheet)

Current progress: The program spawns a docker container to run the code generated with some language-level sandboxing restrictions. Since it is currently raw docker, it is not fully secure as a sandbox but the container structure should handle typical cases of code generation.

Todo: Integrate a virtualization layer to make it more secure and also implement a few more language-level sandboxing features.

How to test:
The sandboxing code is stored inside the /inference/sandbox folder. To test it, simply navigate into this folder and run python3 spawn_docker_sandbox.py. The code to be run can be changed in test.py. The current test is the language translation example from the colab notebook.

Credits:
Language-level sandboxing inspiration taken from Jessica McKellar's presentation at PyCon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant