You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/service/jobs/job_utils.go
+49Lines changed: 49 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,55 @@ import (
11
11
"path/filepath"
12
12
)
13
13
14
+
// AutodriverLimits limits to construct the autodriver cli args
15
+
// more info - https://github.com/UB-CSE-IT/Autolab-Public-Documentation/blob/d6c2fb902d8cc0534794f20d6ef0bab871fe2602/The%20autograding%20process.md#running-the-job
16
+
// todo verify assumptions
17
+
typeAutodriverLimitsstruct {
18
+
// limits the number of processes that can be started
19
+
ULimitint
20
+
// sets the maximum file size that can be created in bytes I assume
21
+
MaxFileSizeint
22
+
// limits the size of the output in bytes I assume
23
+
MaxOutputSizeint
24
+
// sets the job timeout in seconds I assume
25
+
Timeoutint
26
+
}
27
+
28
+
const (
29
+
// DefaultLeviathanEntryCommand command for normal graders made for leviathan
30
+
DefaultLeviathanEntryCommand="cd autolab;"
31
+
// DefaultTangoEntryCommand command for tango compatibility
32
+
// sets up autograde cli
33
+
DefaultTangoEntryCommand=""+
34
+
"chown autolab:autolab autolab; chmod 755 autolab;"+// mode perm since CopyToContainer switches to root and messes up perms
"cat output/feedback;"// print stdout so that leviathan can parse
37
+
)
38
+
39
+
var (
40
+
// DefaultAutoDriverLimits limits taken from https://github.com/UB-CSE-IT/Autolab-Public-Documentation/blob/d6c2fb902d8cc0534794f20d6ef0bab871fe2602/The%20autograding%20process.md#running-the-job
41
+
DefaultAutoDriverLimits=AutodriverLimits{
42
+
ULimit: 100,
43
+
MaxFileSize: 104857600,
44
+
Timeout: 20,
45
+
MaxOutputSize: 1024000,
46
+
}
47
+
)
48
+
49
+
// builds the autodriver command for tango compatibility
50
+
// defaults to DefaultAutoDriverLimits, if limits is nil
0 commit comments