QingdaoU / OnlineJudge

Open source online judge based on Vue, Django and Docker. | 青岛大学开源 Online Judge | QQ群 496710125 | admin@qduoj.com
http://opensource.qduoj.com/
MIT License
6.14k stars 1.49k forks source link

Fixed the problem of importing pandas, scipy, numpy in judge-server. #448

Open nick12340 opened 1 year ago

nick12340 commented 1 year ago

Set "read_only" as false in docker-compose.yml:

  judge-server:
    image: registry.cn-hangzhou.aliyuncs.com/onlinejudge/judge_server
    container_name: judge-server
    restart: always
    read_only: false
    tmpfs:
      - /tmp
    volumes:
      - ./data/backend/test_case:/test_case:ro
      - ./data/judge_server/log:/log
      - ./data/judge_server/run:/judger
    environment:
      - SERVICE_URL=http://judge-server:8080
      - BACKEND_URL=http://oj-backend:8000/api/judge_server_heartbeat/
      - TOKEN=CHANGE_THIS
        #- judger_debug=1

Install packages and dependencies through apt-get

docker exec -it judge-server bash
apt-get update
apt-get install build-essential
apt-get install libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev
apt-get install python3-pandas
sawyerYoung commented 6 months ago

I encountered an issue while installing packages and dependencies. The second instruction cannot run properly. image