Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add JuliaLang #32

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

add JuliaLang #32

wants to merge 6 commits into from

Conversation

miguelraz
Copy link

First step to handle Add Julia to OmegaUp

@miguelraz miguelraz changed the title add julia binary to Dockerfile.rootfs add JuliaLang Jul 30, 2022
@@ -14,6 +14,7 @@ use crate::args;
const DEFAULT_EXTRA_MEMORY_SIZE_IN_BYTES: u64 = 16 * 1024 * 1024;
const RUBY_EXTRA_MEMORY_SIZE_IN_BYTES: u64 = 56 * 1024 * 1024;
const GO_EXTRA_MEMORY_SIZE_IN_BYTES: u64 = 512 * 1024 * 1024;
const JULIA_EXTRA_MEMORY_SIZE_IN_BYTES: u64 = 512 * 1024 * 1024;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how was this measured?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just took the largest I saw.
I'm guessing it will need tweaking.

@@ -686,6 +687,21 @@ impl JailOptions {
seccomp_profile_name = String::from("go");
execve_args.extend([format!("./{}", args.run_target)]);
}
args::Language::Julia => {
extra_memory_size_in_bytes = JULIA_EXTRA_MEMORY_SIZE_IN_BYTES;
seccomp_profile_name = String::from("jl");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like the seccomp files are missing from this change! can they be added?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure - I don't know what those are though 😅

@miguelraz
Copy link
Author

That part of the build that is failing is due to

 ERROR:root:Failed to run 'strace -f -o /home/runner/work/omegajail/omegajail/smoketest/run/jl/strace-compiler.txt -s 512 /home/runner/work/omegajail/omegajail/rootfs/bin/omegajail --homedir /home/runner/work/omegajail/omegajail/smoketest/run/jl --homedir-writable -1 /home/runner/work/omegajail/omegajail/smoketest/run/jl/compile.out -2 /home/runner/work/omegajail/omegajail/smoketest/run/jl/compile.err -M /home/runner/work/omegajail/omegajail/smoketest/run/jl/compile.meta -t 30000 -O 10485100 --root /home/runner/work/omegajail/omegajail/rootfs --compile jl --compile-source Main.jl --compile-target Main --cgroup-path /system.slice/omegaup-runner.service/omegajail'

I didn't know how to work the invocation arguments for the Julia runner, but if I have a file solution.jl which has my code

print(parse(Int, readline())

and an input file called input.txt

10

to run it I would do

julia solution.jl < input.txt

And it would spit out

10

@miguelraz
Copy link
Author

Bump @lhchavez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants