This project is an online judging system for automating the code testing in competitions. It supports code submissions in C, C++, Java and Python. This judge compiles and executes the submitted code to check for correctness based on pre-constructed testcases. Competition organizers can also configure memory and time restrictions as hard limits for the code thus ensuring fairness for participants. It also features a web based dashboard for ease of management of the competition.
$ sudo pip3 install virtualenv
$ virtualenv -p python3 newenv
$ source newenv/bin/activate
$ cd newenv$ git clone https://github.com/RushabhK/Online-Judge.git
$ cd Online-Judge$ pip install -r requirements.txt
$ sudo apt-get update
$ sudo apt-get install python-pip python-dev mysql-server libmysqlclient-dev
$ sudo mysql_install_db
$ sudo mysql_secure_installation
$ mysql -u root -p
> CREATE DATABASE judge_database;
> CREATE USER judge_user@localhost IDENTIFIED BY 'password';
> use judge_database;
> GRANT ALL PRIVILEGES ON judge_database TO judge_user@'localhost';
> FLUSH PRIVILEGES;
> exit
$ pip install django mysqlclient
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver
- Download .deb file of docker(For Ubuntu)
- Install command:
$ sudo dpkg -i /path_to_deb_file
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
Logout and again login to apply changes
$ cd Judge
$ docker build -t judge_image .
- Set test time settings in Backend/settings.py (DURATION and START_TIME)
- Set memory limit in Judge/scripts/constants.py (MEMORY_LIMIT)
$ python manage.py runserver