forked from python-discord/snekbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnekbox.cfg
167 lines (145 loc) · 2.54 KB
/
snekbox.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: "snekbox"
description: "Execute Python"
mode: ONCE
hostname: "snekbox"
cwd: "/home"
time_limit: 10
keep_env: false
envar: "LANG=en_US.UTF-8"
envar: "OMP_NUM_THREADS=5"
envar: "OPENBLAS_NUM_THREADS=5"
envar: "MKL_NUM_THREADS=5"
envar: "VECLIB_MAXIMUM_THREADS=5"
envar: "NUMEXPR_NUM_THREADS=5"
envar: "PYTHONDONTWRITEBYTECODE=true"
envar: "PYTHONIOENCODING=utf-8:strict"
envar: "PYTHONUNBUFFERED=true"
envar: "PYTHONUSERBASE=/snekbox/user_base"
envar: "HOME=/home"
keep_caps: false
rlimit_as: 700
rlimit_fsize_type: INF
clone_newnet: true
clone_newuser: true
clone_newns: true
clone_newpid: true
clone_newipc: true
clone_newuts: true
clone_newcgroup: true
uidmap {
inside_id: "65534"
outside_id: "65534"
}
gidmap {
inside_id: "65534"
outside_id: "65534"
}
mount_proc: true
mount {
src: "/etc/ld.so.cache"
dst: "/etc/ld.so.cache"
is_bind: true
rw: false
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
rw: false
}
mount {
src: "/lib64"
dst: "/lib64"
is_bind: true
rw: false
}
mount {
src: "/snekbox"
dst: "/snekbox"
is_bind: true
rw: false
}
mount {
src: "/usr/lib"
dst: "/usr/lib"
is_bind: true
rw: false
}
mount {
src: "/lang"
dst: "/lang"
is_bind: true
rw: false
}
mount {
src: "/dev/null"
dst: "/dev/null"
is_bind: true
rw: true
}
mount {
src: "/usr/local/bin/python"
dst: "/usr/local/bin/python"
is_bind: true
rw: false
}
mount {
src: "/usr/local/bin/python3"
dst: "/usr/local/bin/python3"
is_bind: true
rw: false
}
mount {
src: "/usr/local/bin/python3.12"
dst: "/usr/local/bin/python3.12"
is_bind: true
rw: false
}
mount {
dst: "/dev/shm"
fstype: "tmpfs"
rw: true
is_bind: false
options: "size=40m"
}
mount {
dst: "/proc"
fstype: "proc"
}
mount {
src_content: "nameserver 1.1.1.1"
dst: "/etc/resolv.conf"
}
mount {
src: "/usr/share"
dst: "/usr/share"
is_bind: true
}
mount {
src: "/dev/urandom"
dst: "/dev/urandom"
is_bind: true
rw: true
}
mount {
dst: "/tmp"
fstype: "tmpfs"
rw: true
is_bind: false
}
mount {
dst: "/dev/shm"
fstype: "tmpfs"
rw: true
is_bind: false
}
cgroup_mem_max: 73400320
cgroup_mem_swap_max: 0
cgroup_mem_mount: "/sys/fs/cgroup/memory"
cgroup_pids_max: 6
cgroup_pids_mount: "/sys/fs/cgroup/pids"
iface_no_lo: true
exec_bin {
path: "/lang/python/default/bin/python"
arg: ""
}