-
Notifications
You must be signed in to change notification settings - Fork 0
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
WIP: transfer functionality from PkgEval #1
base: main
Are you sure you want to change the base?
Conversation
Fixes #22
Use it to download the nightly tarball.
Various improvements
Differentiate between versions (version, file, sha) and builds (name, url)
Support for Julia 1.6.
Introduce a Config object, and other clean-ups.
This makes it possible to import the data without requiring PkgEval.
This reverts commit 49da8d4. Memory limits don't work on cgroup2, libuv/libuv#2323, and the CPU quota seems to incur a serious overhead. Since we can just use taskset, let's leave out the systemd-approach for now.
Replace Docker with Sandbox.jl
using Example | ||
""" | ||
|
||
run_sandboxed_julia(`-e $script`; privileged=true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed privileged=true
to run this on my EC2 instance
mkpath(artifacts_path) | ||
read_write_maps = merge(mounts, Dict( | ||
joinpath(rootfs.home, ".julia/artifacts") => artifacts_path, | ||
joinpath(rootfs.home, ".julia") => dot_julia_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want to map over the whole .julia
but I would get permissions errors otherwise. It's not clear to me if read-write
means the rootfs is read-only except for the write-mapped bits, or if it means these are the only directories that the code in the sandbox can write to on the host filesystem.
- run: | | ||
git config --global user.name Tester | ||
git config --global user.email [email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if we needed this; copied from PkgEval
|
||
[[debian.download]] | ||
sha256 = "3c3c78a1b15490bfdc29cfd10a72f5f16195ccf64ffc4cdfb445cad387ea5b50" | ||
url = "https://github.com/JuliaCI/PkgEval.jl/releases/download/v0.1/debian-buster-20210420.tar.xz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still points to PkgEval, I guess we should upload our own?
function run_sandboxed_julia(args=``; wait=true, | ||
registries_dir=joinpath(first(DEPOT_PATH), "registries"), | ||
storage_dir=mktempdir(), | ||
install::String=dirname(dirname(Sys.which("julia"))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a positional argument without a default in PkgEval. Probably I should move it back to that? This was convenient though
run_sandboxed_julia(install::String, args=``; env=Dict(), mounts=Dict(), | ||
wait=true, stdin=stdin, stdout=stdout, stderr=stderr, | ||
install_dir="/opt/julia", kwargs...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of date
Still WIP, or ready to review? |
it's ready for review but I don't think it's ready for merge, since I have outstanding self-review concerns aha |
To preserve history, I used git-filter-repo on PkgEval to filter down to just the
run.jl
file, then set the upstream to this repo and merged with allow unrelated histories.This probably doesn't work yet but to get farther I need to switch from my Mac laptop to a remote linux machine and I figured this was a reasonable point to open a draft PR.The tests seem to work at this point.