anupkr913563/code-execution
0
Code Execution Engine
A high-performance code execution and judging engine supporting C, C++, and Python. Supports both Docker-based and process-based execution modes.
Features
- Multi-language support: C (GCC 13.x), C++ (G++ 13.x with C++17), Python 3.11
- Batch execution: Compile once, run multiple test cases efficiently
- Dual execution modes:
- Docker mode: Full isolation using sandbox containers (recommended for production)
- Process mode: Direct subprocess execution (for Hugging Face Spaces)
- RESTful API: Simple endpoints for code execution and judging
API Endpoints
Deployment
Hugging Face Spaces
Deploy using Dockerfile.huggingface:
# The Dockerfile.huggingface is configured for HF Spaces
# Set Space SDK to "Docker" and it will use this fileSelf-hosted (Docker)
docker-compose up -dEnvironment Variables
Quick Test
node test/quick-test.js http://localhost:3000