File tree Expand file tree Collapse file tree 7 files changed +63
-5
lines changed
frontend/src/stdlib/analyses Expand file tree Collapse file tree 7 files changed +63
-5
lines changed Original file line number Diff line number Diff line change @@ -22,3 +22,6 @@ docs/site/
2222# committed for packages, but should be committed for applications that require a static
2323# environment.
2424Manifest.toml
25+
26+ # Julia sys images
27+ * .so
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ Decapodes = "0.5.6"
2929DiagrammaticEquations = " 0.1.7"
3030Distributions = " 0.25"
3131GeometryBasics = " 0.4"
32+ IJulia = " 1.26.0"
3233JSON3 = " 1"
3334LinearAlgebra = " 1"
3435MLStyle = " 0.4"
Original file line number Diff line number Diff line change @@ -25,11 +25,22 @@ julia --project -e 'import Pkg; Pkg.instantiate()'
2525
2626## Usage
2727
28- Navigate to this directory and run :
28+ Navigate to this directory and launch the Jupyter serving by running :
2929
3030``` sh
31- jupyter server --IdentityProvider.token= " " --ServerApp.disable_check_xsrf=True --ServerApp.allow_origin= " http://localhost:5173 "
31+ ./jupyter_server.sh
3232```
3333
3434While the Jupyter server is running, the AlgebraicJulia service will be usable
35- by CatColab served locally.
35+ by CatColab when served locally.
36+
37+ ## Compiling a Sysimage
38+
39+ Precompiling dependencies like ` CairoMakie.jl ` and ` OrdinaryDiffEq.jl ` can be
40+ time-consuming. A ** sysimage** is a file that stores precompilation statements,
41+ making future invocations of ` AlgebraicJuliaService ` and its dependencies
42+ immediate.
43+
44+ To build a sysimage, run the Julia program ` ./make_sysimage.jl ` as a script.
45+ This process may take upwards of five minutes or longer, depending on your
46+ machine.
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ KERNEL_NAME=" julia-1.11"
4+ # KERNEL_NAME="julia-ajaas-1.11"
5+
6+ ORIGIN=" http://localhost:5173"
7+
8+ jupyter server \
9+ --IdentityProvider.token=" " \
10+ --ServerApp.disable_check_xsrf=True \
11+ --ServerApp.allow_origin=" $ORIGIN " \
12+ --ServerApp.allow_credentials=True \
13+ --MultiKernelManager.default_kernel_name=" $KERNEL_NAME "
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env julia
2+
3+ @info " Verifying PackageCompiler is installed globally"
4+ using Pkg; Pkg. activate(); Pkg. add(" PackageCompiler" )
5+ using PackageCompiler
6+
7+ @info " Activating sysimage environment"
8+ Pkg. activate(@__DIR__)
9+
10+ @info " Creating the sysimage. This may take a while..."
11+ sysimg= " AlgebraicJuliaService.so"
12+ create_sysimage([" AlgebraicJuliaService" ], sysimage_path= sysimg,
13+ precompile_execution_file= " sysimage_precompile.jl" )
14+ sysimg_path= joinpath(@__DIR__, sysimg);
15+
16+ @info " Adding $sysimg_path to IJulia kernel"
17+ Pkg. activate(); Pkg. add(" IJulia" )
18+ using IJulia
19+
20+ installkernel(" Julia AJaaS" , " --project=@." , " --sysimage=$sysimg_path " )
21+
22+ @info " Done!"
23+ exit()
Original file line number Diff line number Diff line change 1+ import AlgebraicJuliaService
2+ include(joinpath(pkgdir(AlgebraicJuliaService), " test" , " runtests.jl" ))
Original file line number Diff line number Diff line change @@ -39,9 +39,14 @@ export function createKernel(
3939
4040/** Create a Julia kernel in a reactive context. */
4141export function createJuliaKernel ( serverOptions : ServerSettings ) {
42+ // XXX: How do we know...
43+ // - which Julia version to use?
44+ // - whether to use the standard kernel or one with our custom sys image?
45+ // For now, we are omitting the kernel name completely and thus assuming
46+ // that the correct default kernel has been set on the Jupyter server.
47+ // Obviously this approach will not extend to multiple languages.
4248 return createKernel ( serverOptions , {
43- // XXX: Do I have to specify the Julia version?
44- name : "julia-1.11" ,
49+ //name: "julia-1.11",
4550 } ) ;
4651}
4752
You can’t perform that action at this time.
0 commit comments