DOMjudge / domjudge-packaging

DOMjudge packaging for (Linux) distributions and live image
31 stars 37 forks source link

No module named 'requests' #149

Closed sebasptsch closed 1 year ago

sebasptsch commented 1 year ago

I'm trying to setup domjudge in docker and it is failing immediately after the migration script.

Domserver is exiting with the message No module named 'requests'

domserver    | [info] ++ migrating DoctrineMigrations\Version20230122162836 (Drop enabled from external contest sources and make cid unique)
domserver    | [info] Migration DoctrineMigrations\Version20230122162836 migrated (took 33.7ms, used 58.5M memory)
domserver    | [notice] finished in 7031.8ms, used 58.5M memory, 62 migrations executed, 315 sql queries
domserver    |
domserver    |
domserver    |    > loading App\DataFixtures\DefaultData\ExecutableFixture
domserver    |    > loading App\DataFixtures\DefaultData\LanguageFixture
domserver    |    > loading App\DataFixtures\DefaultData\RoleFixture
domserver    |    > loading App\DataFixtures\DefaultData\TeamCategoryFixture
domserver    |    > loading App\DataFixtures\DefaultData\TeamFixture
domserver    |    > loading App\DataFixtures\DefaultData\UserFixture
domserver    |
domserver    |    > loading App\DataFixtures\ExampleData\JudgehostFixture
domserver    |    > loading App\DataFixtures\ExampleData\TeamAffiliationFixture
domserver    |    > loading App\DataFixtures\ExampleData\TeamCategoryFixture
domserver    |    > loading App\DataFixtures\ExampleData\TeamFixture
domserver    |    > loading App\DataFixtures\ExampleData\UserFixture
domserver    | Traceback (most recent call last):
domserver    |   File "/opt/domjudge/domserver/bin/import-contest", line 27, in <module>
domserver    |     import dj_utils
domserver    |   File "/opt/domjudge/domserver/lib/dj_utils.py", line 10, in <module>
domserver    |     import requests
domserver    | ModuleNotFoundError: No module named 'requests'
domserver    | [!!] Start script 50-domjudge.sh failed
domserver exited with code 1
nickygerritsen commented 1 year ago

Ah yes we need this package nowadays. What version are you running? I will add the package

sebasptsch commented 1 year ago

My docker compose config. @nickygerritsen

version: '3.9'

networks:
  domjudge:
    name: domjudge

services:
  mariadb:
    container_name: mariadb
    image: mariadb:latest
    volumes:
      - /volume1/docker/domjudge/mariadb:/var/lib/mysql
    networks:
      - domjudge
    ports:
      - 3306:3306
    environment:
      - MYSQL_ROOT_PASSWORD=<password>
      - MYSQL_USER=domjudge
      - MYSQL_PASSWORD=<password>
      - MYSQL_DATABASE=domjudge
    command: --max-connections=100

  domserver:
    container_name: domserver
    image: domjudge/domserver:latest
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
    networks:
      - domjudge
    ports:
      - 12345:80
    depends_on:
      - mariadb
    environment:
      - CONTAINER_TIMEZONE=Australia/Sydney
      - MYSQL_HOST=mariadb
      - MYSQL_ROOT_PASSWORD=<password>
      - MYSQL_USER=domjudge
      - MYSQL_PASSWORD=<password>
      - MYSQL_DATABASE=domjudge

  judgehost-0:
    container_name: judgehost-0
    image: domjudge/judgehost:latest
    privileged: true
    hostname: judgedaemon-0
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
    networks:
      - domjudge
    depends_on:
      - domserver
    environment:
      - DAEMON_ID=0
      - JUDGEDAEMON_PASSWORD=<password>