Assume that you followed the installation instruction!
You need:
- WAN_IP of your backend server
123.xxx.xxx.xxx
or if you host judge server in the same VPS or machine with your backend server, then this is0.0.0.0
orlocalhost
- PORT of your backend server, by default of judge server is
9999
- What tier?, here we assume you using
dmoj/judge-tier1
Read Judge profile template here or
id: <judge name>
key: <judge authentication key>
problem_storage_globs:
- /problems/*
- Assume that you are login as user
judger
, create folderproblems
to store judge profile and problems data inside it.
judger@callmeqan:~$ mkdir problems
judger@callmeqan:~$ cd problems
judger@callmeqan:~/problems$ nano judge01.yml
...Paste the sample configuration above to yaml file
- Now we have root problems is
/home/judger/problems
judger@callmeqan:~/problems$ cd /home/judger
judger@callmeqan:~$ sudo docker run \
--name judge \
--network="host" \
-v /home/judger/problems:/problems \
--cap-add=SYS_PTRACE \
-d \
--restart=always \
dmoj/judge-tier1:latest \
run -p PORT -c /problems/judge01.yml WAN_IP -A 0.0.0.0 -a 9111
Note:
- Remember to change the name of docker containerjudge
to sth else if you run multiple judge
- If you create multiple profiles, replace it with judge02, judge03 for easier management!
- Multiple judge on same Server, you must increase the number id9111
up