Skip to content

osmanirosado/dmoj-judge-server

Repository files navigation

Readme

Docker compose stack for running the dmoj judge.

Initialization

  1. Generate the configuration files for the scripts.
bash setup-judges-config.sh
  1. Generate the environment files (.env) and the aliases.
bash init-judges-files.sh

The default configuration for this command can be changed in the init-judges.conf file.

  1. Show the project directory tree to see the new files created by the setupenv.sh script. Using -a to show hidden files and -I to ignore the git hidden directory.
tree -a -I .git .
  1. Load the aliases in the current shell session
source bash_aliases

Or, install the aliases for the current user

cat < bash_aliases >> ~/.bash_aliases

For example, the alias judge1dc allows the execution of the docker compose command in the environment of the judge one.

Build

  1. Build the judge image. If you want to change the image tag, modify the environment variable in the .env file.
docker compose build --pull
  1. Run the judge tests.
docker compose run app test

This command runs the available tests for each language run time.

Judge

  1. Define the judge key in the .env file for the judge one and review the other environment variables.
nano judge1/.env 
  1. Review the environment variables substitution in the docker compose.
judge1dc config
  1. Execute the judge, the -d option runs it in the background.
judge1dc up -d
  1. See the logs for the judge, the -f option waits for the judge output.
judge1dc logs -f

Recreate the judges

  1. Tag the latest image as active.
bash tag-latest-image-as-active.sh
  1. Recreate the judges to use the latest image.
perl recreate-judges.pl

If a judge is not running, it is starting during this process.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published