Giter VIP home page Giter VIP logo

vnoi-admin / judge-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dmoj/judge-server

8.0 8.0 16.0 7.41 MB

Judging backend server for the VNOJ online judge.

Home Page: https://oj.vnoi.info

License: GNU Affero General Public License v3.0

Python 60.97% C 1.57% C++ 31.28% Dockerfile 0.85% Makefile 0.08% Shell 0.33% Java 1.44% Pascal 0.37% Go 0.04% C# 0.08% Assembly 0.05% Roff 0.01% Cython 2.33% Brainfuck 0.54% Rust 0.05%
hacktoberfest online-judge

judge-server's Issues

judge-server Fail scratch

Vấn đề deploy scratch-run cho dmoj
Mình đã làm theo hướng dẫn và khi run bằng docker có hiển thị đã run thành công scratch trên terminal nhưng trên web máy chấm ko hiển thị scratch.
image

  • File cấu hình đã có scracth:
    image

  • Trên web không hiển thị scratch:
    image

Nhờ team hỗ trợ mình. Thanks all.

Lỗi khi cài đặt judge

Khi tiến hành cài đặt judge, khi chạy lệnh make judge-tiervnoj thì báo lỗi như sau:

[2/4] RUN apt-get update && apt-get install -y --no-install-recommends openjdk-19-jdk-headless openjdk-19-jre-headless unzip jq && rm -rf /var/lib/apt/lists/*:
#0 0.562 Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
#0 0.582 Get:2 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
#0 0.694 Ign:3 http://security.debian.org/debian-security stretch/updates InRelease
#0 0.761 Err:4 http://security.debian.org/debian-security stretch/updates Release
#0 0.761 404 Not Found [IP: 151.101.130.132 80]
#0 0.871 Get:5 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [237 kB]
#0 0.943 Get:6 http://deb.debian.org/debian sid InRelease [184 kB]
#0 1.279 Get:7 http://deb.debian.org/debian experimental InRelease [101 kB]
#0 1.345 Ign:8 http://deb.debian.org/debian stretch InRelease
#0 1.402 Get:9 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
#0 1.687 Get:10 http://deb.debian.org/debian sid/main amd64 Packages [9436 kB]
#0 1.997 Err:11 http://deb.debian.org/debian stretch Release
#0 1.997 404 Not Found [IP: 151.101.78.132 80]
#0 2.058 Get:12 http://deb.debian.org/debian experimental/main amd64 Packages [833 kB]
#0 4.060 Reading package lists...
#0 5.516 E: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
#0 5.516 E: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.


ERROR: failed to solve: executor failed running [/bin/sh -c apt-get update && apt-get install -y --no-install-recommends openjdk-19-jdk-headless openjdk-19-jre-headless unzip jq && rm -rf /var/lib/apt/lists/*]: exit code: 100
make: *** [Makefile:18: judge-tiervnoj] Error 1

Rất mong admin hỗ trợ sửa lỗi này, cảm ơn.

Judge setup error

sudo make judge-tier1
[sudo] password for duongnhanac:

docker build --build-arg TAG="master" -t vnoj/judge-tier1 -t vnoj/judge-tier1:latest tier1
[+] Building 19.7s (7/7) FINISHED                  docker:default
 => [internal] load build definition from Dockerfile         0.0s
 => => transferring dockerfile: 1.71kB                       0.0s
 => [internal] load .dockerignore                            0.0s
 => => transferring context: 2B                              0.0s
 => [internal] load metadata for docker.io/dmoj/runtimes-ti  3.1s
 => [1/4] FROM docker.io/dmoj/runtimes-tier1@sha256:5f76244  0.0s
 => CACHED [2/4] RUN apt-get update &&  apt-get install -y   0.0s
 => CACHED [3/4] RUN ARCH=$([ $(uname -m) = "x86_64" ] && e  0.0s
 => ERROR [4/4] RUN mkdir /judge /problems && cd /judge &&  16.5s
------                                                            
 > [4/4] RUN mkdir /judge /problems && cd /judge &&     curl -L https://github.com/VNOI-Admin/judge-server/archive/"master".tar.gz | tar -xz --strip-components=1 &&        python3 -m venv --prompt=DMOJ /env &&     /env/bin/pip3 install cython &&         /env/bin/pip3 install -e . &&     /env/bin/python3 setup.py develop &&    HOME=~judge . ~judge/.profile && 	runuser -u judge -w PATH -- /env/bin/dmoj-autoconf -V > /judge-runtime-paths.yml && 	echo '  crt_x86_in_lib32: true' >> /judge-runtime-paths.yml && 	curl -L https://raw.githubusercontent.com/VNOI-Admin/testlib/master/testlib.h -o /usr/include/testlib.h && 	g++ -std=c++17 -Wall -DONLINE_JUDGE -O2 -fmax-errors=5 -march=native -s /usr/include/testlib.h && 	curl -L https://raw.githubusercontent.com/skyvn97/testlib/customized-testlib/testlib_themis_cms.h -o /usr/include/testlib_themis_cms.h && 	g++ -std=c++17 -Wall -DONLINE_JUDGE -DTHEMIS -O2 -fmax-errors=5 -march=native -s /usr/include/testlib_themis_cms.h && 	find /usr/include/ -name stdc++.h -exec g++ -std=c++17 -Wall -DONLINE_JUDGE -O2 -fmax-errors=5 -march=native -s {} ;:
0.435   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
0.435                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 15749    0 15749    0     0  10217      0 --:--:--  0:00:01 --100  492k    0  492k    0     0   200k      0 --:--:--  0:00:02 --100  977k    0  977k    0     0   375k      0 --:--:--  0:00:02 --:--:--  904k
8.673 Collecting cython
8.909   Downloading Cython-3.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB)
9.422      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 7.1 MB/s eta 0:00:00
9.493 Installing collected packages: cython
10.34 Successfully installed cython-3.0.0
10.85 Obtaining file:///judge
10.85   Installing build dependencies: started
14.97   Installing build dependencies: finished with status 'done'
15.02   Checking if build backend supports build_editable: started
15.18   Checking if build backend supports build_editable: finished with status 'done'
15.18   Getting requirements to build editable: started
16.27   Getting requirements to build editable: finished with status 'error'
16.28   error: subprocess-exited-with-error
16.28   
16.28   × Getting requirements to build editable did not run successfully.
16.28   │ exit code: 1
16.28   ╰─> [86 lines of output]
16.28       
16.28       Error compiling Cython file:
16.28       ------------------------------------------------------------
16.28       ...
16.28           def abi(self):
16.28               return self.thisptr.abi()
16.28       
16.28           def on_return(self, callback):
16.28               self.on_return_callback[self.tid] = callback
16.28               self.thisptr.on_return(pt_syscall_return_handler, <void*>self)
16.28                                      ^
16.28       ------------------------------------------------------------
16.28       
16.28       dmoj/cptbox/_cptbox.pyx:414:31: Cannot assign type 'void (void *, pid_t, int) except * nogil' to 'pt_syscall_return_callback'
16.28       
16.28       Error compiling Cython file:
16.28       ------------------------------------------------------------
16.28       ...
16.28               self._cpu_affinity_mask = 0
16.28               self._init_nvcsw = self._init_nivcsw = 0
16.28       
16.28               self.debugger = self.create_debugger()
16.28               self.process = new pt_process(self.debugger.thisptr)
16.28               self.process.set_callback(pt_syscall_handler, <void*>self)
16.28                                         ^
16.28       ------------------------------------------------------------
16.28       
16.28       dmoj/cptbox/_cptbox.pyx:448:34: Cannot assign type 'int (void *, int) except? -1 nogil' to 'pt_handler_callback'
16.28       
16.28       Error compiling Cython file:
16.28       ------------------------------------------------------------
16.28       ...
16.28               self._init_nvcsw = self._init_nivcsw = 0
16.28       
16.28               self.debugger = self.create_debugger()
16.28               self.process = new pt_process(self.debugger.thisptr)
16.28               self.process.set_callback(pt_syscall_handler, <void*>self)
16.28               self.process.set_event_proc(pt_event_handler, <void*>self)
16.28                                           ^
16.28       ------------------------------------------------------------
16.28       
16.28       dmoj/cptbox/_cptbox.pyx:449:36: Cannot assign type 'int (void *, int, unsigned long) except? -1 nogil' to 'pt_event_callback'
16.28       
16.28       Error compiling Cython file:
16.28       ------------------------------------------------------------
16.28       ...
16.28                           PyErr_NoMemory()
16.28       
16.28                       for i in range(MAX_SYSCALL):
16.28                           config.seccomp_handlers[i] = handlers[i]
16.28       
16.28                   if self.process.spawn(pt_child, &config):
16.28                                         ^
16.28       ------------------------------------------------------------
16.28       
16.28       dmoj/cptbox/_cptbox.pyx:534:34: Cannot assign type 'int (void *) except? -1 nogil' to 'pt_fork_handler'
16.28       Compiling /judge/dmoj/cptbox/_cptbox.pyx because it changed.
16.28       [1/1] Cythonizing /judge/dmoj/cptbox/_cptbox.pyx
16.28       Traceback (most recent call last):
16.28         File "/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
16.28           main()
16.28         File "/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
16.28           json_out['return_val'] = hook(**hook_input['kwargs'])
16.28                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16.28         File "/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
16.28           return hook(config_settings)
16.28                  ^^^^^^^^^^^^^^^^^^^^^
16.28         File "/tmp/pip-build-env-p_4pshls/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 450, in get_requires_for_build_editable
16.28           return self.get_requires_for_build_wheel(config_settings)
16.28                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16.28         File "/tmp/pip-build-env-p_4pshls/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
16.28           return self._get_build_requires(config_settings, requirements=['wheel'])
16.28                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16.28         File "/tmp/pip-build-env-p_4pshls/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
16.28           self.run_setup()
16.28         File "/tmp/pip-build-env-p_4pshls/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup
16.28           self).run_setup(setup_script=setup_script)
16.28                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16.28         File "/tmp/pip-build-env-p_4pshls/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
16.28           exec(code, locals())
16.28         File "<string>", line 177, in <module>
16.28         File "/tmp/pip-build-env-p_4pshls/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
16.28           cythonize_one(*args)
16.28         File "/tmp/pip-build-env-p_4pshls/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
16.28           raise CompileError(None, pyx_file)
16.28       Cython.Compiler.Errors.CompileError: /judge/dmoj/cptbox/_cptbox.pyx
16.28       [end of output]
16.28   
16.28   note: This error originates from a subprocess, and is likely not a problem with pip.
16.28 error: subprocess-exited-with-error
16.28 
16.28 × Getting requirements to build editable did not run successfully.
16.28 │ exit code: 1
16.28 ╰─> See above for output.
16.28 
16.28 note: This error originates from a subprocess, and is likely not a problem with pip.
------
Dockerfile:16
--------------------
  15 |     
  16 | >>> RUN mkdir /judge /problems && cd /judge && \
  17 | >>> 	curl -L https://github.com/VNOI-Admin/judge-server/archive/"${TAG}".tar.gz | tar -xz --strip-components=1 && \
  18 | >>> 	python3 -m venv --prompt=DMOJ /env && \
  19 | >>> 	/env/bin/pip3 install cython && \
  20 | >>> 	/env/bin/pip3 install -e . && \
  21 | >>> 	/env/bin/python3 setup.py develop && \
  22 | >>> 	HOME=~judge . ~judge/.profile && \
  23 | >>> 	runuser -u judge -w PATH -- /env/bin/dmoj-autoconf -V > /judge-runtime-paths.yml && \
  24 | >>> 	echo '  crt_x86_in_lib32: true' >> /judge-runtime-paths.yml && \
  25 | >>> 	curl -L https://raw.githubusercontent.com/VNOI-Admin/testlib/master/testlib.h -o /usr/include/testlib.h && \
  26 | >>> 	g++ -std=c++17 -Wall -DONLINE_JUDGE -O2 -fmax-errors=5 -march=native -s /usr/include/testlib.h && \
  27 | >>> 	curl -L https://raw.githubusercontent.com/skyvn97/testlib/customized-testlib/testlib_themis_cms.h -o /usr/include/testlib_themis_cms.h && \
  28 | >>> 	g++ -std=c++17 -Wall -DONLINE_JUDGE -DTHEMIS -O2 -fmax-errors=5 -march=native -s /usr/include/testlib_themis_cms.h && \
  29 | >>> 	find /usr/include/ -name stdc++.h -exec g++ -std=c++17 -Wall -DONLINE_JUDGE -O2 -fmax-errors=5 -march=native -s {} \;
  30 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c mkdir /judge /problems && cd /judge && \tcurl -L https://github.com/VNOI-Admin/judge-server/archive/\"${TAG}\".tar.gz | tar -xz --strip-components=1 && \tpython3 -m venv --prompt=DMOJ /env && \t/env/bin/pip3 install cython && \t/env/bin/pip3 install -e . && \t/env/bin/python3 setup.py develop && \tHOME=~judge . ~judge/.profile && \trunuser -u judge -w PATH -- /env/bin/dmoj-autoconf -V > /judge-runtime-paths.yml && \techo '  crt_x86_in_lib32: true' >> /judge-runtime-paths.yml && \tcurl -L https://raw.githubusercontent.com/VNOI-Admin/testlib/master/testlib.h -o /usr/include/testlib.h && \tg++ -std=c++17 -Wall -DONLINE_JUDGE -O2 -fmax-errors=5 -march=native -s /usr/include/testlib.h && \tcurl -L https://raw.githubusercontent.com/skyvn97/testlib/customized-testlib/testlib_themis_cms.h -o /usr/include/testlib_themis_cms.h && \tg++ -std=c++17 -Wall -DONLINE_JUDGE -DTHEMIS -O2 -fmax-errors=5 -march=native -s /usr/include/testlib_themis_cms.h && \tfind /usr/include/ -name stdc++.h -exec g++ -std=c++17 -Wall -DONLINE_JUDGE -O2 -fmax-errors=5 -march=native -s {} \\;" did not complete successfully: exit code: 1
make: *** [Makefile:9: judge-tier1] Error 1

Add new wrapper for CMS checker

CMS checker use following format:

  • The cmd arguments: same as testlib: {input_file} {answer_file} {output_file}
  • The feedback format:
    • stdout: First line contain a float number from 0 to 1, that is the point (in 0->1 scale) that the submission had.
    • stderr: feedback

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.