1
1
export Configuration
2
2
3
3
function prepare_runner ()
4
- for runner in ( " ubuntu " , " arch " )
5
- cd ( joinpath ( dirname ( @__DIR__ ) , " runner. $runner " )) do
6
- cmd = ` docker build --tag newpkgeval:$runner .`
4
+ cd ( joinpath ( dirname ( @__DIR__ ) , " runner " )) do
5
+ for runner in ( " ubuntu " , " arch " )
6
+ cmd = ` docker build --tag newpkgeval:$runner --file Dockerfile. $runner .`
7
7
if ! isdebug (:docker )
8
8
cmd = pipeline (cmd, stdout = devnull , stderr = devnull )
9
9
end
@@ -44,7 +44,9 @@ function runner_sandboxed_julia(install::String, args=``; interactive=true, tty=
44
44
storage= nothing , cache= nothing , sysimage= nothing ,
45
45
runner= " ubuntu" , depot= " /home/pkgeval/.julia" ,
46
46
xvfb:: Bool = true , init:: Bool = true )
47
- cmd = ` docker run`
47
+ # # Docker args
48
+
49
+ cmd = ` docker run --rm`
48
50
49
51
# expose any available GPUs if they are available
50
52
if find_library (" libcuda" ) != " "
@@ -59,16 +61,9 @@ function runner_sandboxed_julia(install::String, args=``; interactive=true, tty=
59
61
cmd = ``` $cmd --mount type=bind,source=$julia_path ,target=/opt/julia,readonly
60
62
--mount type=bind,source=$registry_path ,target=/usr/local/share/julia/registries,readonly
61
63
--env JULIA_DEPOT_PATH="$depot :/usr/local/share/julia"
62
- --env JULIA_PKG_PRECOMPILE_AUTO=0
63
64
--env JULIA_PKG_SERVER
64
65
```
65
66
66
- # allow identification of PkgEval
67
- cmd = ` $cmd --env CI=true --env PKGEVAL=true --env JULIA_PKGEVAL=true`
68
-
69
- # disable system discovery of Python and R
70
- cmd = ` $cmd --env PYTHON="" --env R_HOME="*"`
71
-
72
67
if storage != = nothing
73
68
cmd = ` $cmd --mount type=bind,source=$storage ,target=/storage`
74
69
end
@@ -77,10 +72,6 @@ function runner_sandboxed_julia(install::String, args=``; interactive=true, tty=
77
72
cmd = ` $cmd --mount type=bind,source=$cache ,target=/cache`
78
73
end
79
74
80
- if sysimage != = nothing
81
- args = ` --sysimage=$sysimage $args `
82
- end
83
-
84
75
# mount working directory in tmpfs
85
76
if tmpfs
86
77
cmd = ` $cmd --tmpfs /home/pkgeval:exec,uid=1000,gid=1000`
@@ -110,10 +101,19 @@ function runner_sandboxed_julia(install::String, args=``; interactive=true, tty=
110
101
cmd = ` $cmd --init`
111
102
end
112
103
104
+ cmd = ` $cmd newpkgeval:$runner `
105
+
106
+
107
+ # # Julia args
108
+
109
+ if sysimage != = nothing
110
+ args = ` --sysimage=$sysimage $args `
111
+ end
112
+
113
113
if xvfb
114
- ` $cmd --rm newpkgeval: $runner xvfb-run /opt/julia/bin/julia $args `
114
+ ` $cmd $depot xvfb-run /opt/julia/bin/julia $args `
115
115
else
116
- ` $cmd --rm newpkgeval: $runner /opt/julia/bin/julia $args `
116
+ ` $cmd $depot /opt/julia/bin/julia $args `
117
117
end
118
118
end
119
119
@@ -146,12 +146,6 @@ function run_sandboxed_test(install::String, pkg; log_limit = 2^20 #= 1 MB =#,
146
146
versioninfo()
147
147
println()
148
148
149
- mkpath(first(DEPOT_PATH))
150
-
151
- # global storage of downloaded artifacts
152
- mkpath("/storage/artifacts")
153
- symlink("/storage/artifacts", joinpath(first(DEPOT_PATH), "artifacts"))
154
-
155
149
using Pkg
156
150
Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true
157
151
@@ -385,12 +379,6 @@ function run_compiled_test(install::String, pkg; compile_time_limit=30*60, cache
385
379
versioninfo()
386
380
println()
387
381
388
- mkpath(first(DEPOT_PATH))
389
-
390
- # global storage of downloaded artifacts
391
- mkpath("/storage/artifacts")
392
- symlink("/storage/artifacts", joinpath(first(DEPOT_PATH), "artifacts"))
393
-
394
382
using Pkg
395
383
Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true
396
384
@@ -504,6 +492,7 @@ function run(configs::Vector{Configuration}, pkgs::Vector;
504
492
for (config, (install,cache)) in instantiated_configs
505
493
Base. run (``` docker run --mount type=bind,source=$storage ,target=/storage
506
494
--mount type=bind,source=$cache ,target=/cache
495
+ --entrypoint=''
507
496
newpkgeval:ubuntu
508
497
sudo chown -R pkgeval:pkgeval /storage /cache``` )
509
498
end
@@ -744,6 +733,7 @@ function run(configs::Vector{Configuration}, pkgs::Vector;
744
733
uid = ccall (:getuid , Cint, ())
745
734
gid = ccall (:getgid , Cint, ())
746
735
Base. run (``` docker run --mount type=bind,source=$cache ,target=/cache
736
+ --entrypoint=''
747
737
newpkgeval:ubuntu
748
738
sudo chown -R $uid :$gid /cache``` )
749
739
rm (cache; recursive= true )
0 commit comments