Fair electronic judge
Fejudge is a contest management system, created for automatic solution evaluation. It was inspired by other grading systems, such as Codeforces, Ejudge and CMS.
With help of libsbox, Fejudge is designed to become faster than other systems while evaluating submissions - evaluation on 50 tests of a correct solution to problem A+B takes 1-2 secs.
To become familiar with Fejudge, visit http://m20-sch57.site:3113/, where the test build is located. There are some easy problems which you can solve and submit solutions in order to check perfomance of Fejudge (or to enjoy its nice user interface).
Fejudge supports problem packages built on polygon.
These instructions will guide you through the installation process of Fejudge.
- linux kernel version 5 or higher
- cgroup v1 heirarchy mounted in /sys/fs/cgroup
- C++ 17 compiler, with
std::filesystem
support - CMake version 3.10 or higher
- Python 3.6 or higher, see
requirements.txt
- Download
nfs-kernel-server
package - Create storage folder and set correct permissions to it
mkdir storage
sudo chown nobody:nogroup storage/
- Open file
/etc/exports
and share this folder with all other clients - Export it
sudo exportfs -a
- Start
rpcbind
andnfs-kernel-server
services
sudo service rpcbind start
sudo service nfs-kernel-server start
- Download
nfs-common
package - Mount remote storage folder
mkdir storage
sudo mount <STORAGE_REMOTE_FOLDER> storage/
STORAGE_REMOTE_FOLDER
is a remote path to storage directory on NFS server, for example 57.57.57.57:/Fejudge/storage
.
- Download
postgresql
package - Start
postgresql
service
sudo service postgresql start
- Create database
database.db
and userpostgres
with passwordpostgres
sudo -u postgres createuser postgres
sudo -u postgres createdb database.db
sudo -u postgres psql
psql=# alter user postgres with encrypted password 'postgres';
If you use another login and password, then specify POSTGRES_USER
and POSTGRES_PASSWORD
variables at each client.
- Download and install NATS Server
- Run it by typing
nats-server
- Upgrade database and initialize defaults
flask db upgrade
./reset.sh
- Run main server
export POSTGRES_URL=<...>:5432
export NATS_URL=<...>:4222
export MAIL_USERNAME=<...>
export MAIL_PASSWORD=<...>
./run.sh
Your email will be used to send informational letters.
- Compile and install libsbox, located in
./invoker/libsbox
- Run invoker
cd invoker/
export POSTGRES_URL=<...>:5432
export SOCKETIO_URL=<...>:3113
export NATS_URL=<...>:4222
sudo -E ./run.sh
If you want to run multiple invokers on a single machine, specify INVOKER_NAME
before running
export INVOKER_NAME=<UNIQUE_ID>
To start in docker, run docker-compose build && docker-compose up
in the project directory.
TODO
- Fedor Kuyanov(@kuyanov)
- Andrei Odintsov (@Forestryks)
This project is licensed under the MIT License - see the LICENSE file for details.