Skip to content

Install SchOJ

Outvi V edited this page Jan 17, 2021 · 12 revisions
  1. Install Docker and docker-compose.
  2. Clone (or download the zip of) this repository.
  3. If you are cloning, run:
git pull --recurse-submodules
git submodule init
git submodule update --remote --recursive
  1. If you are downloading the zip, download dmoj-judge and dmoj-site, then extract them to build/judge and build/site. Make sure there is one Dockerfile each in build/site/Dockerfile and build/judge/Dockerfile.

  2. Decide what branch you want to use:

    For judge, we support several basic languages. If you want some more languages, run git checkout multilang at build/judge. Notice that the multilang branch may be not up to date. Also, remove the language packages you do not want to use, or the image would be huge (about 7GB)! Details

  3. Change the configurations of dmoj-judge (tutorial) and dmoj-site (tutorial, only the part of Dockerfile and local_settings.py).

  4. Run docker-compose build.

  5. Run docker-compose up -d.

  6. Check everything is working fine.

    The first time run will initialize and migrate the database. You can stop the servers with Ctrl-C when the site is ready, for example, if:

    • You can see the site page with the browser (like visiting http://127.0.0.1/)
    • You see WSGI app 0 (mountpoint='') ready in ... in the log.
    • You see Authentication as "key" failed on: [site]:9999 in the log (This failure is normal. We need to configure the key on the site before the judge can connect to the site.)
  7. Modify the site settings (tutorial, the part of "After the server is running").

  8. Add your questions, add your data and enjoy.

Clone this wiki locally