mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-21 04:26:28 +02:00
multi user containerization* upgrades
This commit is contained in:
parent
7891b676eb
commit
d5e61f6922
15 changed files with 54 additions and 30 deletions
|
@ -1,3 +1,3 @@
|
|||
cd /tmp/$1
|
||||
cd /tmp/$2
|
||||
timeout -s KILL 10 gcc -o binary -x c code.code
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' ./binary"
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./binary"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
cd /tmp/$1
|
||||
cd /tmp/$2
|
||||
timeout -s KILL 10 g++ -o binary -x c++ code.code
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' ./binary"
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./binary"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
cd /tmp/$1
|
||||
cd /tmp/$2
|
||||
timeout -s KILL 10 mcs $(echo code.code | sed 's/\///') -out:binary
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' mono binary"
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 mono binary"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
cd /tmp/$1
|
||||
cd /tmp/$2
|
||||
cp code.code interim.go
|
||||
file="interim.go"
|
||||
GOROOT=/usr/lib/go timeout -s KILL 10 go build $file
|
||||
file=${file%%.*}
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' ./$file"
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./$file"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
cd /tmp/$1
|
||||
cd /tmp/$2
|
||||
cp code.code interim.java
|
||||
name=$(cat interim.java | grep -Eo 'public\s+class\s+([A-Za-z0-9]+)' | sed -n 's/ */ /gp' | cut -d' ' -f3)
|
||||
mv interim.java $name.java
|
||||
timeout -s KILL 10 javac $name.java
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' java $name"
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 java $name"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cd /tmp/$1
|
||||
cd /tmp/$2
|
||||
timeout -s KILL 10 nasm -f elf64 -o binary.o code.code
|
||||
timeout -s KILL 10 ld binary.o -o binary
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' ./binary"
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./binary"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
cd /tmp/$1
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' nodejs code.code"
|
||||
cd /tmp/$2
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 nodejs code.code"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
cd /tmp/$1
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' php code.code"
|
||||
cd /tmp/$2
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 php code.code"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
cd /tmp/$1
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' python2 code.code"
|
||||
cd /tmp/$2
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 python2 code.code"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
cd /tmp/$1
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' python3.6 code.code"
|
||||
cd /tmp/$2
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 python3.6 code.code"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
cd /tmp/$1
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' Rscript code.code"
|
||||
cd /tmp/$2
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 Rscript code.code"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
cd /tmp/$1
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' ruby code.code"
|
||||
cd /tmp/$2
|
||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ruby code.code"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue