Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.07 KB

judge_environment.md

File metadata and controls

50 lines (38 loc) · 1.07 KB

Judge Environment

  • C (GCC 13)
  • C++ (GCC 13)
  • Java (Temurin 21)
  • Python3 (CPython 3.12)
  • Go (Go 1.22)
  • JavaScript (Node.js 20)

Customization

  1. [Optional] Build custom judge server container image

    If you don't need to modify judge environment, you can skip this step.

    git clone https://github.com/QingdaoU/JudgeServer.git
    cd JudgeServer
    # modify something...
    docker buildx build . -t oj-image/judge --load
  2. Download languages.py to the deploy folder.

  3. Edit and mount the languages.py

    services:
      # ...
      oj-backend:
        # ...
        volumes:
          - ./data/backend:/data
          - ./languages.py:/app/judge/languages.py:ro
  4. Start containers

    docker compose up -d
  5. Overwrite judge language config in database from mounted languages.py

    docker compose exec -T oj-backend python manage.py shell <<EOF
    from options.options import SysOptions
    SysOptions.reset_languages()
    EOF