Skip to content

Distributed Grader for Use with Submit System v4+

License

Notifications You must be signed in to change notification settings

jskenney/grader4

Repository files navigation

The following directions will help prepare a machine to be used as
a client to the submission system (version 4+).

Step 1, ensure that required python3 libraries are installed.

pip3 install requests

Step 2, configure config.py with the api location and your api key

Step 3, ensure stand alone client can connect to the server and run code

python3 client.py

-------------------------------------------------------------------------
For the docker server, continue with:

Step 4, install docker

sudo apt install docker.io

Step 5, set your user as part of the docker group

sudo usermod -aG docker username

Step 6, logout or reboot

Step 7, install docker lib for python3

pip3 install docker

Step 8, Configure DNS for docker, edit /etc/docker/daemon.json
and copy the following contents

{
    "dns": ["10.1.74.10"]
}

Step 9, builder base docker image

cd cs-base
docker build -t cs-base .

Step 10, configure number of running instances in config.py

Step 11, run as Server

python3 server.py

###############################################################################
NOTE: the permissions of these files must be readable by other users,
the server will spawn these under a different user and if the permissions are
of this user will not be able to run the client.

###############################################################################
NOTE: To test the docker system with the lines below, you will need to create
a Dockerfile, use the following text as a basis:

echo """
FROM cs-base
MAINTAINER Jeff Kenney
COPY . /app
WORKDIR /app
CMD python3 client.py --base cs-base
""" | tee Dockerfile

###############################################################################
NOTE: you can test the docker instance directly via
docker run --rm $(docker build -q .)

NOTE: you can test a specific user's work via
docker run --rm $(docker build -q .) python3 client.py --course SI204 --project hw06 --user m210072 --rulename case1

###############################################################################
NOTE: if you want to delete all docker containers and images do:
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)

About

Distributed Grader for Use with Submit System v4+

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published