136 lines
1.6 KiB
Protocol Buffer
136 lines
1.6 KiB
Protocol Buffer
name: "python run script"
|
|
|
|
mode: ONCE
|
|
hostname: "python"
|
|
log_level: ERROR
|
|
time_limit: 300
|
|
|
|
rlimit_as: 2048
|
|
rlimit_cpu: 1000
|
|
rlimit_fsize: 1024
|
|
rlimit_nofile: 64
|
|
|
|
cwd: "/tmp"
|
|
|
|
clone_newnet: false
|
|
clone_newuser: {CLONE_NEWUSER}
|
|
|
|
keep_caps: false
|
|
keep_env: true
|
|
|
|
mount {
|
|
src: "/bin"
|
|
dst: "/bin"
|
|
is_bind: true
|
|
}
|
|
|
|
mount {
|
|
src: "/lib"
|
|
dst: "/lib"
|
|
is_bind: true
|
|
}
|
|
|
|
|
|
mount {
|
|
src: "/lib64"
|
|
dst: "/lib64"
|
|
is_bind: true
|
|
}
|
|
|
|
|
|
mount {
|
|
src: "/usr"
|
|
dst: "/usr"
|
|
is_bind: true
|
|
}
|
|
|
|
mount {
|
|
src: "/dev/null"
|
|
dst: "/dev/null"
|
|
is_bind: true
|
|
rw: true
|
|
}
|
|
|
|
mount {
|
|
dst: "/tmp"
|
|
fstype: "tmpfs"
|
|
rw: true
|
|
options: "size=500000000"
|
|
}
|
|
|
|
mount {
|
|
src: "/nsjail_data/python/nltk_data"
|
|
dst: "/tmp/nltk_data"
|
|
is_bind: true
|
|
rw: false
|
|
mandatory: false
|
|
}
|
|
|
|
mount {
|
|
src: "{JOB_DIR}/inner.py"
|
|
dst: "/tmp/inner.py"
|
|
is_bind: true
|
|
}
|
|
|
|
mount {
|
|
src: "{JOB_DIR}/main.py"
|
|
dst: "/tmp/main.py"
|
|
is_bind: true
|
|
}
|
|
|
|
mount {
|
|
src: "{JOB_DIR}/args.json"
|
|
dst: "/tmp/args.json"
|
|
is_bind: true
|
|
}
|
|
|
|
mount {
|
|
src: "{JOB_DIR}/result.json"
|
|
dst: "/tmp/result.json"
|
|
rw: true
|
|
is_bind: true
|
|
}
|
|
|
|
|
|
mount {
|
|
src: "{JOB_DIR}/dependencies"
|
|
dst: "/tmp/dependencies"
|
|
is_bind: true
|
|
}
|
|
|
|
mount {
|
|
src: "/etc/ssl"
|
|
dst: "/etc/ssl"
|
|
is_bind: true
|
|
}
|
|
|
|
mount {
|
|
src: "/etc/pki"
|
|
dst: "/etc/pki"
|
|
is_bind: true
|
|
mandatory: false
|
|
}
|
|
|
|
mount {
|
|
src: "/etc/resolv.conf"
|
|
dst: "/etc/resolv.conf"
|
|
is_bind: true
|
|
}
|
|
|
|
mount {
|
|
src: "/dev/random"
|
|
dst: "/dev/random"
|
|
is_bind: true
|
|
}
|
|
|
|
{SHARED_MOUNT}
|
|
|
|
{SHARED_DEPENDENCIES}
|
|
|
|
iface_no_lo: true
|
|
|
|
envar: "PYTHONPATH=/tmp/dependencies{ADDITIONAL_PYTHON_PATHS}"
|
|
envar: "HOME=/tmp"
|
|
|
|
|