mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
增强判题和 docker 安全性
This commit is contained in:
parent
e3d3fa7eb4
commit
4ab1107627
@ -62,6 +62,8 @@ class JudgeClient(object):
|
||||
" --max-real-time " + str(self._max_real_time / 1000.0 * 2) + \
|
||||
" --max-memory " + str(self._max_memory * 1000 * 1000) + \
|
||||
" --network false" + \
|
||||
" --remount-dev true " + \
|
||||
" --reset-env true " + \
|
||||
" --syscalls '" + self._language["syscalls"] + "'" + \
|
||||
" --max-nprocess 20" + \
|
||||
" --uid " + str(lrun_uid) + \
|
||||
|
||||
@ -14,7 +14,7 @@ def judge(submission_id, time_limit, memory_limit, test_case_id):
|
||||
command = "%s run --privileged --rm " \
|
||||
"--link mysql " \
|
||||
"-v %s:/var/judger/test_case/:ro " \
|
||||
"-v %s:/var/judger/code/ " \
|
||||
"-v %s:/var/judger/code/:ro " \
|
||||
"-v %s:/var/judger/code/log/ " \
|
||||
"--device /dev/null:/dev/null " \
|
||||
"%s " \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user