Skip to content

Commit

Permalink
sysimage instead of app in docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlabayle committed Dec 23, 2023
1 parent f8358ff commit ccc2a07
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion deps/build_app.jl
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
using PackageCompiler
PackageCompiler.create_app(".", "tmle", precompile_execution_file="deps/execute.jl", include_lazy_artifacts=true)
PackageCompiler.create_app(".", "tmle",
lib_name="tmle",
precompile_execution_file="deps/execute.jl",
include_lazy_artifacts=true
)
6 changes: 6 additions & 0 deletions deps/build_sysimage.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using PackageCompiler
PackageCompiler.create_sysimage(
["TargetedEstimation"],
sysimage_path="TMLESysimage.so",
precompile_execution_file="deps/execute.jl",
)
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WORKDIR /TargetedEstimation.jl
RUN julia --project -e'using Pkg; Pkg.instantiate(); Pkg.resolve(); Pkg.precompile()'

# Build CLI
RUN julia --project --startup-file=no deps/build_app.jl
RUN julia --project --startup-file=no deps/build_sysimage.jl

# Test the CLI runs
RUN /TargetedEstimation.jl/tmle/bin/TargetedEstimation tmle data/sample_dataset.csv
RUN julia --startup-file=no --project -JTMLESysimage.so tmle.jl tmle data/sample_dataset.csv
1 change: 1 addition & 0 deletions tmle.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
using TargetedEstimation; main()

0 comments on commit ccc2a07

Please sign in to comment.