A worker node in a distributed autograding system which runs a pipeline of docker containers and communicates with the master node (Broadway API). More information about the distributed autograder and the grader's role and responsibilities are on the API's Wiki page.
The grader uses the Chainlink library to sequencially run docker containers and aggregate results.
The Braodway grader instances require Python 3.5+.
The following environment variables need to be set before continuing:
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
We recommend installing packages inside a virtualenv. To create one, run:
sudo apt-get install python3-pip python3-venv
python3 -m venv venv
Then activate the virtualenv and install the packages from requirements.txt:
source venv/bin/activate
pip3 install -r requirements.txt
Docker is needed to containerize incoming job requests. We recommend using the convinience script on docker.com and completing the suggested post-installation steps.
Ensure API_HOST
and API_PORT
in the config file (config.py) is pointing to the Broadway API instance you have set up.
Start the grader using:
nohup sudo venv/bin/python run.py <cluster token> &
Note that under sudo
the python interpreter path changes to /usr/bin/python
even when inside a virtual environment.