/
compilers-and-tools.cfg
212 lines (181 loc) · 3.67 KB
/
compilers-and-tools.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
name: "compiler explorer compilation/tool sandbox"
mode: ONCE
hostname: "ce"
time_limit: 0
log_level: FATAL
rlimit_as_type: INF
rlimit_cpu_type: SOFT
rlimit_fsize: 1024 # 1GB
rlimit_nofile: 300 # 300 because .NET loves to open many files
uidmap {
inside_id: "10240"
}
gidmap {
inside_id: "10240"
}
detect_cgroupv2: true
# for cgroups v1:
# must run following as root during system startup
# cgcreate -a $USER:$USER -g memory,pids,cpu,net_cls:ce-compile
cgroup_mem_parent: "ce-compile"
cgroup_pids_parent: "ce-compile"
cgroup_net_cls_parent: "ce-compile"
cgroup_cpu_parent: "ce-compile"
cgroup_mem_max: 1342177280 # 1.25 GiB
cgroup_pids_max: 72
cgroup_cpu_ms_per_sec: 1000
# for cgroups v2:
# must run following as root during system startup
# cgcreate -a $USER:$USER -g memory,pids,cpu:ce-compile
# sudo chown $USER:root /sys/fs/cgroup/cgroup.procs
cgroupv2_mount: "/sys/fs/cgroup/ce-compile"
mount {
src: "/bin"
dst: "/bin"
is_bind: true
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
}
mount {
src: "/usr"
dst: "/usr"
is_bind: true
}
mount {
src: "/etc/localtime"
dst: "/etc/localtime"
is_bind: true
}
mount {
src_content: "nobody:x:65534:65534:Not root:/root:/none\nce:x:10240:10240:Not a real account:/app:/bin/bash"
dst: "/etc/passwd"
is_bind: true
}
mount {
src_content: "nogroup:x:65534:\n\nce:x:10240:"
dst: "/etc/group"
is_bind: true
}
mount {
# this password hash is here intentionally, and is not actually used for anything
src_content: "ce:$1$rockyou$hty8SH9lK4mcCQXKENxaa1:18723:0:99999:7:::"
dst: "/etc/shadow"
is_bind: true
}
# Mounting ld.so.conf* is needed to get the magic that lets pthread be found by libc.
# See https://github.com/compiler-explorer/compiler-explorer/issues/2611
mount {
src: "/etc/ld.so.conf.d"
dst: "/etc/ld.so.conf.d"
is_bind: true
}
mount {
src: "/etc/ld.so.conf"
dst: "/etc/ld.so.conf"
is_bind: true
}
mount {
src: "/lib64"
dst: "/lib64"
is_bind: true
mandatory: false
}
mount {
src: "/lib32"
dst: "/lib32"
is_bind: true
mandatory: false
}
mount {
dst: "/tmp"
fstype: "tmpfs"
options: "size=536870912,nr_inodes=1000" # 512MiB; nvc++ is particularly disk-intensive
rw: true
noexec: true
nodev: true
nosuid: true
}
mount {
src: "/dev/null"
dst: "/dev/null"
rw: true
is_bind: true
}
mount {
src: "/dev/zero"
dst: "/dev/zero"
is_bind: true
}
mount {
src: "/dev/urandom"
dst: "/dev/random"
is_bind: true
}
mount {
src: "/dev/urandom"
dst: "/dev/urandom"
is_bind: true
}
mount {
src: "/dev/nvidia0"
dst: "/dev/nvidia0"
is_bind: true
mandatory: false
}
mount {
src: "/dev/nvidiactl"
dst: "/dev/nvidiactl"
is_bind: true
mandatory: false
}
mount {
src: "/dev/nvidia-modeset"
dst: "/dev/nvidia-modeset"
is_bind: true
mandatory: false
}
mount {
src: "/dev/nvidia-uvm"
dst: "/dev/nvidia-uvm"
is_bind: true
mandatory: false
}
mount {
dst: "/proc"
fstype: "proc"
}
mount {
src: "/opt/compiler-explorer"
dst: "/opt/compiler-explorer"
is_bind: true
}
# Needed for icc
mount {
src: "/opt/intel"
dst: "/opt/intel"
is_bind: true
mandatory: false
}
# Needed for ARM non-free compilers
mount {
src: "/opt/arm"
dst: "/opt/arm"
is_bind: true
mandatory: false
}
# Needed for things with shim scripts e.g. Python
mount {
src: "/infra/.deploy/etc/scripts"
dst: "/infra/.deploy/etc/scripts"
is_bind: true
mandatory: false
}
mount {
src: "/infra/.deploy/examples"
dst: "/infra/.deploy/examples"
is_bind: true
mandatory: false
}