Skip to content

Repository files navigation

Omlorix Code Execution Gateway

Omlorix Code Execution Gateway

Omlorix Code Execution Gateway runs model-generated Python and Bash in isolated Docker sessions. The same gateway can render HTML slides to PPTX and compile LaTeX to PDF.

Omlorix calls this service over authenticated HTTP so submitted code never runs inside the Omlorix API container. Redis stores shared session, lock, and rate-limit state, while a restricted Docker proxy creates and manages sandbox containers.

Security warning: Docker containers share a kernel and are not equivalent to virtual machines. Do not expose this service to arbitrary hostile users without a stronger runtime or dedicated disposable hosts. Keep the gateway private, protect Docker access, use strong API keys, and leave sandbox networking and runtime package installation disabled unless required.

Caution

Disclaimer: This software is provided "as is" without any warranties. Use it at your own risk. To the maximum extent permitted by applicable law, the maintainers are not liable for damages resulting from its use.

Documentation

Use the Omlorix administrator documentation for deployment and operation:

Configuration defaults and descriptions live in .env.example.

Capabilities

  • Persistent authenticated Python and Bash sandbox sessions
  • Input and generated-file transfer
  • Optional, policy-controlled pip installation and sandbox networking
  • HTML slide rendering through POST /api/render
  • LaTeX rendering through POST /api/latex/render
  • Resource, timeout, rate, concurrency, request, and file limits
  • Authenticated health, version, and metrics endpoints

Quick start from source

These instructions do not grant rights beyond LICENSE. They are intended for uses permitted by that license, including its time-limited evaluation.

Prerequisites are Docker with Compose v2 and Git. Python 3.12+ is needed only for local tests. make is optional.

Clone the repository:

git clone https://github.com/phinaldoo/omlorix-code-execution.git
cd omlorix-code-execution

With Make:

make setup
make build
make up

Without Make on macOS or Linux:

bash ./setup.sh
docker compose --profile local-docker --profile build build
docker compose --profile local-docker up -d

On Windows PowerShell:

powershell -ExecutionPolicy Bypass -File .\setup.ps1
docker compose --profile local-docker --profile build build
docker compose --profile local-docker up -d

Setup creates or updates .env and generates API_KEYS=local:<secret> when necessary. Keep .env private and use the secret portion after the colon as the Bearer token.

Verify the authenticated readiness endpoint:

curl -fsS http://127.0.0.1:8000/health \
  -H "Authorization: Bearer <secret>"

Useful local commands:

make logs
make ps
make restart
make down

License

Omlorix Code Execution is source-available under the PolyForm Free Trial License 1.0.0. You may evaluate it for less than 32 consecutive calendar days for a particular application. Production use, continued use, and redistribution require separate permission.

Third-party components remain under their respective licenses. See THIRD_PARTY_NOTICES.md for the runtime, container, development, and CI dependency inventory and attribution notices.