mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 13:28:41 +00:00
feat(judger): upgrade to ubuntu:20.04
This commit is contained in:
parent
4b54cf7560
commit
e92b8a4e36
@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:18.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
ARG CLONE_ADDFLAG
|
ARG CLONE_ADDFLAG
|
||||||
|
|
||||||
|
@ -8,6 +8,10 @@ getAptPackage(){
|
|||||||
|
|
||||||
setJudgeConf(){
|
setJudgeConf(){
|
||||||
printf "\n\n==> Setting judger files\n"
|
printf "\n\n==> Setting judger files\n"
|
||||||
|
#specify environment
|
||||||
|
cat > /etc/environment <<UOJEOF
|
||||||
|
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
|
UOJEOF
|
||||||
#Add judger user
|
#Add judger user
|
||||||
adduser judger --gecos "" --disabled-password
|
adduser judger --gecos "" --disabled-password
|
||||||
#Set uoj_data path
|
#Set uoj_data path
|
||||||
|
@ -193,6 +193,7 @@ int syscall_max_cnt_list_default[][2] = {
|
|||||||
{__NR_write , -1},
|
{__NR_write , -1},
|
||||||
{__NR_readv , -1},
|
{__NR_readv , -1},
|
||||||
{__NR_writev , -1},
|
{__NR_writev , -1},
|
||||||
|
{__NR_pread64 , -1},
|
||||||
{__NR_open , -1},
|
{__NR_open , -1},
|
||||||
{__NR_unlink , -1},
|
{__NR_unlink , -1},
|
||||||
{__NR_close , -1},
|
{__NR_close , -1},
|
||||||
@ -395,7 +396,7 @@ void init_conf(const RunProgramConfig &config) {
|
|||||||
statable_file_name_set.insert("/usr/bin");
|
statable_file_name_set.insert("/usr/bin");
|
||||||
statable_file_name_set.insert("/usr/lib");
|
statable_file_name_set.insert("/usr/lib");
|
||||||
# ifdef UOJ_JUDGER_BASESYSTEM_UBUNTU1804
|
# ifdef UOJ_JUDGER_BASESYSTEM_UBUNTU1804
|
||||||
statable_file_name_set.insert("/usr/lib/python36.zip");
|
statable_file_name_set.insert("/usr/lib/python38.zip");
|
||||||
# endif
|
# endif
|
||||||
} else if (config.type == "java8") {
|
} else if (config.type == "java8") {
|
||||||
syscall_max_cnt[__NR_gettid ] = -1;
|
syscall_max_cnt[__NR_gettid ] = -1;
|
||||||
@ -408,6 +409,7 @@ void init_conf(const RunProgramConfig &config) {
|
|||||||
syscall_max_cnt[__NR_clone ] = 13;
|
syscall_max_cnt[__NR_clone ] = 13;
|
||||||
|
|
||||||
syscall_max_cnt[__NR_getdents ] = 4;
|
syscall_max_cnt[__NR_getdents ] = 4;
|
||||||
|
syscall_max_cnt[__NR_getdents64 ] = 4;
|
||||||
|
|
||||||
syscall_max_cnt[__NR_clock_getres ] = 2;
|
syscall_max_cnt[__NR_clock_getres ] = 2;
|
||||||
|
|
||||||
@ -455,6 +457,7 @@ void init_conf(const RunProgramConfig &config) {
|
|||||||
syscall_max_cnt[__NR_clone ] = 14;
|
syscall_max_cnt[__NR_clone ] = 14;
|
||||||
|
|
||||||
syscall_max_cnt[__NR_getdents ] = 4;
|
syscall_max_cnt[__NR_getdents ] = 4;
|
||||||
|
syscall_max_cnt[__NR_getdents64 ] = 4;
|
||||||
|
|
||||||
syscall_max_cnt[__NR_clock_getres ] = 2;
|
syscall_max_cnt[__NR_clock_getres ] = 2;
|
||||||
|
|
||||||
@ -474,6 +477,7 @@ void init_conf(const RunProgramConfig &config) {
|
|||||||
syscall_max_cnt[__NR_pread64 ] = -1;
|
syscall_max_cnt[__NR_pread64 ] = -1;
|
||||||
syscall_max_cnt[__NR_prctl ] = -1;
|
syscall_max_cnt[__NR_prctl ] = -1;
|
||||||
syscall_max_cnt[__NR_nanosleep ] = -1;
|
syscall_max_cnt[__NR_nanosleep ] = -1;
|
||||||
|
syscall_max_cnt[__NR_clock_nanosleep] = -1;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
syscall_should_soft_ban[__NR_socket ] = true;
|
syscall_should_soft_ban[__NR_socket ] = true;
|
||||||
@ -518,6 +522,7 @@ void init_conf(const RunProgramConfig &config) {
|
|||||||
|
|
||||||
syscall_max_cnt[__NR_setrlimit ] = -1;
|
syscall_max_cnt[__NR_setrlimit ] = -1;
|
||||||
syscall_max_cnt[__NR_pipe ] = -1;
|
syscall_max_cnt[__NR_pipe ] = -1;
|
||||||
|
syscall_max_cnt[__NR_pipe2 ] = -1;
|
||||||
|
|
||||||
syscall_max_cnt[__NR_getdents64 ] = -1;
|
syscall_max_cnt[__NR_getdents64 ] = -1;
|
||||||
syscall_max_cnt[__NR_getdents ] = -1;
|
syscall_max_cnt[__NR_getdents ] = -1;
|
||||||
@ -544,6 +549,7 @@ void init_conf(const RunProgramConfig &config) {
|
|||||||
syscall_max_cnt[__NR_pread64 ] = -1;
|
syscall_max_cnt[__NR_pread64 ] = -1;
|
||||||
syscall_max_cnt[__NR_prctl ] = -1;
|
syscall_max_cnt[__NR_prctl ] = -1;
|
||||||
syscall_max_cnt[__NR_nanosleep ] = -1;
|
syscall_max_cnt[__NR_nanosleep ] = -1;
|
||||||
|
syscall_max_cnt[__NR_clock_nanosleep] = -1;
|
||||||
syscall_max_cnt[__NR_socketpair ] = -1;
|
syscall_max_cnt[__NR_socketpair ] = -1;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
@ -47,13 +47,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="collapseThree" class="collapse">
|
<div id="collapseThree" class="collapse">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p>默认的测评环境是 Ubuntu Linux 18.04 LTS x64。</p>
|
<p>默认的测评环境是 Ubuntu Linux 20.04 LTS x64。</p>
|
||||||
<p>C的编译器是 gcc 7.4.0,编译命令:<code>gcc code.c -o code -lm -O2 -DONLINE_JUDGE</code>。</p>
|
<p>C的编译器是 gcc 9.4.0,编译命令:<code>gcc code.c -o code -lm -O2 -DONLINE_JUDGE</code>。</p>
|
||||||
<p>C++的编译器是 g++ 7.4.0,编译命令:<code>g++ code.cpp -o code -lm -O2 -DONLINE_JUDGE</code>。如果选择C++11会在编译命令后面添加<code>-std=c++11</code>。</p>
|
<p>C++的编译器是 g++ 9.4.0,编译命令:<code>g++ code.cpp -o code -lm -O2 -DONLINE_JUDGE</code>。如果选择C++11会在编译命令后面添加<code>-std=c++11</code>。</p>
|
||||||
<p>Java8的JDK版本是 openjdk 1.8.0_222,编译命令:<code>javac code.java</code>。</p>
|
<p>Java8的JDK版本是 openjdk 1.8.0_312,编译命令:<code>javac code.java</code>。</p>
|
||||||
<p>Java11的JDK版本是 openjdk 11.0.4,编译命令:<code>javac code.java</code>。</p>
|
<p>Java11的JDK版本是 openjdk 11.0.14,编译命令:<code>javac code.java</code>。</p>
|
||||||
<p>Pascal的编译器是 fpc 3.0.4,编译命令:<code>fpc code.pas -O2</code>。</p>
|
<p>Pascal的编译器是 fpc 3.0.4,编译命令:<code>fpc code.pas -O2</code>。</p>
|
||||||
<p>Python会先编译为优化过的字节码<samp>.pyo</samp>文件。支持的Python版本分别为Python 2.7和3.6。</p>
|
<p>Python会先编译为优化过的字节码<samp>.pyo</samp>文件。支持的Python版本分别为Python 2.7和3.8。</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user