commit
b750de1f5e
|
@ -72,6 +72,7 @@ func Execute(res http.ResponseWriter, req *http.Request) {
|
|||
"csharp", "cs", "c#",
|
||||
"go",
|
||||
"java",
|
||||
"julia", "jl",
|
||||
"nasm", "asm",
|
||||
"node", "javascript", "js",
|
||||
"php",
|
||||
|
@ -141,6 +142,8 @@ func launch(request Inbound, res http.ResponseWriter) {
|
|||
execlang = "nasm"
|
||||
case "js", "javascript":
|
||||
execlang = "node"
|
||||
case "jl":
|
||||
execlang = "julia"
|
||||
case "python":
|
||||
execlang = "python3"
|
||||
case "ts":
|
||||
|
|
|
@ -63,6 +63,9 @@ case "$lang" in
|
|||
"java")
|
||||
bin=java
|
||||
;;
|
||||
"julia" | "jl")
|
||||
bin=julia
|
||||
;;
|
||||
"nasm" | "asm")
|
||||
bin=nasm
|
||||
;;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
cd /tmp/$2
|
||||
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 julia code.code"
|
|
@ -21,6 +21,9 @@ echo '---'
|
|||
echo 'java'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "java -version"
|
||||
echo '---'
|
||||
echo 'julia'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "julia --version"
|
||||
echo '---'
|
||||
echo 'nasm'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "nasm -version"
|
||||
echo '---'
|
||||
|
|
|
@ -137,6 +137,15 @@ tar -xzf openjdk-14_linux-x64_bin.tar.gz
|
|||
echo 'export PATH=$PATH:/opt/java/jdk-14/bin' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
# install julia
|
||||
#final binary: /opt/julia/julia-1.4.1/bin/julia --version
|
||||
cd /opt && mkdir julia && cd julia
|
||||
wget https://julialang-s3.julialang.org/bin/linux/x64/1.4/julia-1.4.1-linux-x86_64.tar.gz
|
||||
tar -xzf julia-1.4.1-linux-x86_64.tar.gz
|
||||
echo 'export PATH=$PATH:/opt/julia/julia-1.4.1/bin' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
|
||||
# create runnable users and apply limits
|
||||
for i in {1..150}; do
|
||||
useradd -M runner$i
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
println("good")
|
|
@ -16,6 +16,8 @@ echo 'testing asm'
|
|||
../lxc/execute asm test.nasm
|
||||
echo 'testing js'
|
||||
../lxc/execute js test.js
|
||||
echo 'testing jl'
|
||||
../lxc/execute jl test.jl
|
||||
echo 'testing php'
|
||||
../lxc/execute php test.php
|
||||
echo 'testing python2'
|
||||
|
|
Loading…
Reference in New Issue