Judge - HypeX documentation¶
Judge - HypeX is a judge system which focuses on performance and security.
It requires root permission to run. The host must have the full Linux namespaces
support and the memory cgroup
, also the access control lists(acl)
needs to be enabled on the file system.
Requirements¶
python3 >= 3.6
python3-pip
gcc >= 7.4
g++ >= 7.4
clang >= 6.0
cmake >= 2.8
libcgroup-dev >= 0.41
acl
Installation¶
build-container.sh is used to copy files from the host to create the container. Currently, it is designed for Ubuntu 18.04 x86_64
. You may need to modify it to fit your host’s file system. Or you can install it in the docker (see Use Docker).
git clone https://github.com/pzread/judge.git
cd judge
pip3 install -r requirements.txt
mkdir lib
cd lib
cmake ..
make
cd ..
./setup.sh
Usage¶
cd judge
sudo python3 Server.py
Warning
Before delete the container
directory, always remember to umount the udev file systems
under it.
Run Tests¶
cd judge
sudo python3 -m tornado.test.runtests tests.TestDiff
Use Docker¶
Warning
Make sure your docker supports access control lists(acl)
. For more information, see How to use setfacl within a Docker container?.
There is a problem that acl isn’t persistent on the docker’s file system, so ./setup.sh
have to be run after starting a container.
For docker run
, you may need to expose ports to the host.
git clone https://github.com/pzread/judge.git
cd judge
docker build -t judge .
docker run -p ${HOSTPORT}:2501 --privileged=true judge /bin/sh -c 'cd judge && ./setup.sh && python3 Server.py'