Skip to content

A stateless sandbox for evaluating student solutions based on isolate

Notifications You must be signed in to change notification settings

SmartBeansGoe/sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coding Sandbox

Tech Stack

  • docker, mainly for a unified and compact runtime environment that scales easily
  • node.js with express.js as web server for job management
  • isolate for sandboxing

How to run

Docker

The commands to do this are in run.sh.

local instance

Requirements:

The Dockerfile contains all instructions for a debian based installation.

Usage

The container listens (on port 3000). It expects POST-requests on /evaluate with a JSON body that respect the format specified as evaluateInputSchema in src/helpers/schemas.js. It produces outputs that respect evaluateOutputSchema.

Notes

  • the Docker container must (ironically) be started with elevated privileges (priviledged) for the security mechanisms of isolate to work (e.g. control groups)
  • the Docker container sometimes seems not to want to respond to SIGINT. However, docker stop always does.
  • isolate allows a maximum of 999 environments at a time. For their management a semaphore is used
  • isolate is very restrictive by default. If something does not work, this is a good starting point. Examples: multiple processes, RAM, access to other programs/devices
  • this repo is a (mostly anonymized) public release copy. The real repo is not public and this repo might not always be up to date.

About

A stateless sandbox for evaluating student solutions based on isolate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published