Skip to content

hznuoj-dev/hznuoj-judge

Repository files navigation

hznuoj-judge

Build Compiler Build Judge

It's based on Ubuntu 20.04 and contains compilers (and interpreters) below:

  • GCC 11 (from PPA)
  • Clang 11 (from LLVM)
  • OpenJDK 11
  • Free Pascal 3
  • Python 2.7 (from PPA)
  • Python 3.9 (from PPA)
  • Go (from PPA)
  • PHP 8.1 (from PPA)
  • GHC (from PPA)
  • C# (from Mono)
  • F# (from Mono)
  • Bash
  • Perl
  • Ruby
  • Lua 5.3

Each compiler (or interpreter) is available in $PATH.

Use Docker

Build

Direct build:

docker build -t hznuoj-judge:latest -f docker/Dockerfile ./

Step-by-step build:

docker build -t hznuoj-compiler:latest -f docker/Dockerfile.compiler ./
docker build -t hznuoj-judge:latest -f docker/Dockerfile.judge ./

Start

docker run \
  -d -it \
  --privileged=true \
  --cap-add=SYS_PTRACE \
  --shm-size="2g" \
  --restart=always \
  --name=hznuoj-judge \
  -v /var/hznuoj-judge/judge.conf:/home/judge/etc/judge.conf \
  -v /var/hznuoj-judge/data:/home/judge/data \
  hznuoj-judge:latest

Exec

docker exec -it hznuoj-judge bash

Debug

Judge

judged /home/judge debug

Judge Client

judge_client <solution_id> <run dir id> [oj_home_dir] [debug]