From d3cf22e1e5aa1a960230c99c0763f256c9484658 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 25 Oct 2024 16:35:35 +0200 Subject: [PATCH 01/14] update jupyter-server-proxy fork version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 09326a5..6817f18 100644 --- a/setup.py +++ b/setup.py @@ -10,5 +10,5 @@ 'pluto = plutoserver:setup_plutoserver', ] }, - install_requires=['jupyter-server-proxy @ git+http://github.com/fonsp/jupyter-server-proxy@3a58aa5005f942d0c208eab9a480f6ab171142ef'], + install_requires=['jupyter-server-proxy @ git+http://github.com/fonsp/jupyter-server-proxy@470e13ae0f7a8961202c76ea6bcbcfd27ed07e6a'], ) From bd162e0d960264464b5a1e9bbbe39de9f9c1dbbe Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 25 Oct 2024 17:12:07 +0200 Subject: [PATCH 02/14] setup.py: run notebook once to precompile the PlutoRunner boot environment --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 6817f18..798fd84 100644 --- a/setup.py +++ b/setup.py @@ -12,3 +12,8 @@ }, install_requires=['jupyter-server-proxy @ git+http://github.com/fonsp/jupyter-server-proxy@470e13ae0f7a8961202c76ea6bcbcfd27ed07e6a'], ) + +# Start Pluto, open new notebook, shut down notebook. +# This should precompile the PlutoRunner boot environment. +import os +os.system('julia --optimize=0 -e "import Pkg; Pkg.instantiate(); import Pluto; sesh = Pluto.ServerSession(); nb = Pluto.SessionActions.new(sesh; run_async=false); Pluto.SessionActions.shutdown(sesh, nb; async=false);"') From 082c86660280ac2a6293359765c81ed6cf13491a Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 25 Oct 2024 17:13:44 +0200 Subject: [PATCH 03/14] Downgrade to Julia 1.10 --- Manifest.toml | 52 +++++++++++++-------------------------------------- 1 file changed, 13 insertions(+), 39 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index d371beb..9718e1d 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,20 +1,18 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.11.1" +julia_version = "1.10.5" manifest_format = "2.0" -project_hash = "d702d32f28890928c3b0a69b7dbbb9aa1de15960" +project_hash = "b001cb6898b7e2087c56d38463ba1c572909987c" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.2" +version = "1.1.1" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" [[deps.BitFlags]] git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" @@ -52,12 +50,10 @@ version = "1.0.0" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] @@ -82,7 +78,6 @@ version = "0.10.13" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -version = "1.11.0" [[deps.FuzzyCompletions]] deps = ["REPL"] @@ -105,7 +100,6 @@ version = "0.9.5" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" [[deps.IteratorInterfaceExtensions]] git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" @@ -131,17 +125,16 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.6.0+0" +version = "8.4.0+0" [[deps.LibGit2]] deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.7.2+0" +version = "1.6.4+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -150,17 +143,15 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" +version = "1.1.0" [[deps.MIMEs]] git-tree-sha1 = "65f28ad4b594aebe22157d6fac869786a255b7eb" @@ -176,7 +167,6 @@ version = "1.1.2" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" [[deps.MbedTLS]] deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] @@ -187,11 +177,11 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.6+0" +version = "2.28.2+1" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.12.12" +version = "2023.1.10" [[deps.MsgPack]] deps = ["Serialization"] @@ -221,13 +211,9 @@ uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" version = "1.6.3" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.11.0" -weakdeps = ["REPL"] - - [deps.Pkg.extensions] - REPLExt = "REPL" +version = "1.10.0" [[deps.Pluto]] deps = ["Base64", "Configurations", "Dates", "Downloads", "ExpressionExplorer", "FileWatching", "FuzzyCompletions", "HTTP", "HypertextLiteral", "InteractiveUtils", "Logging", "LoggingExtras", "MIMEs", "Malt", "Markdown", "MsgPack", "Pkg", "PlutoDependencyExplorer", "PrecompileSignatures", "PrecompileTools", "REPL", "RegistryInstances", "RelocatableFolders", "Scratch", "Sockets", "TOML", "Tables", "URIs", "UUIDs"] @@ -263,17 +249,14 @@ version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" [[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -version = "1.11.0" [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" [[deps.RegistryInstances]] deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"] @@ -299,7 +282,6 @@ version = "1.2.1" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" [[deps.SimpleBufferStream]] git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1" @@ -308,11 +290,6 @@ version = "1.2.0" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.StyledStrings]] -uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -version = "1.11.0" [[deps.TOML]] deps = ["Dates"] @@ -339,7 +316,6 @@ version = "1.10.0" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -version = "1.11.0" [[deps.TranscodingStreams]] git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" @@ -359,11 +335,9 @@ version = "1.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" [[deps.Zlib_jll]] deps = ["Libdl"] @@ -373,7 +347,7 @@ version = "1.2.13+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.59.0+0" +version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] From 6b328e820026392b58cf2e718529911b71d63104 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 25 Oct 2024 17:28:10 +0200 Subject: [PATCH 04/14] julia 1.10 really this time --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index f1071e0..63bbbe9 100644 --- a/Project.toml +++ b/Project.toml @@ -2,4 +2,4 @@ Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781" [compat] -julia = "1.11" +julia = "1.10" From f4bf786359338639660ea1ff4dce684559dc18eb Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 25 Oct 2024 17:55:19 +0200 Subject: [PATCH 05/14] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 798fd84..5daf08f 100644 --- a/setup.py +++ b/setup.py @@ -16,4 +16,4 @@ # Start Pluto, open new notebook, shut down notebook. # This should precompile the PlutoRunner boot environment. import os -os.system('julia --optimize=0 -e "import Pkg; Pkg.instantiate(); import Pluto; sesh = Pluto.ServerSession(); nb = Pluto.SessionActions.new(sesh; run_async=false); Pluto.SessionActions.shutdown(sesh, nb; async=false);"') +os.system('julia --optimize=0 -e "@info("instantiate from setup.py"); import Pkg; Pkg.instantiate(); @info("import Pluto from setup.py"); import Pluto; @info("starting new notebook"); sesh = Pluto.ServerSession(options=Pluto.Configuration.from_flat_kwargs(; pkgimages="no")); nb = Pluto.SessionActions.new(sesh; run_async=false); @info("shutting down notebook"); Pluto.SessionActions.shutdown(sesh, nb; async=false); @info("setup.py done");"') From 60b7a9aec7a6079d19f0886ba55a70523a488fcc Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Mon, 28 Oct 2024 10:08:14 +0100 Subject: [PATCH 06/14] Log server launch to file --- plutoserver.py | 5 ++++- setup.py | 2 +- start_server.jl | 18 ++++++++++++++++++ start_server.sh | 1 + warmup_server.jl | 17 +++++++++++++++++ 5 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 start_server.jl create mode 100644 start_server.sh create mode 100644 warmup_server.jl diff --git a/plutoserver.py b/plutoserver.py index 235e700..33134da 100644 --- a/plutoserver.py +++ b/plutoserver.py @@ -1,6 +1,9 @@ def setup_plutoserver(): return { - "command": ["julia", "--optimize=0", "-e", "import Pluto; Pluto.run(host=\"0.0.0.0\", port={port}, pkgimages=\"no\", workspace_use_distributed_stdlib=false, launch_browser=false, require_secret_for_open_links=false, require_secret_for_access=false, warn_about_untrusted_code=false, dismiss_update_notification=true, show_file_system=false)"], + "command": ["sh", "start_server.sh"], + "environment": { + "JSP_PORT": "{port}", + }, "timeout": 60, "launcher_entry": { "title": "Pluto.jl", diff --git a/setup.py b/setup.py index 5daf08f..61447bb 100644 --- a/setup.py +++ b/setup.py @@ -16,4 +16,4 @@ # Start Pluto, open new notebook, shut down notebook. # This should precompile the PlutoRunner boot environment. import os -os.system('julia --optimize=0 -e "@info("instantiate from setup.py"); import Pkg; Pkg.instantiate(); @info("import Pluto from setup.py"); import Pluto; @info("starting new notebook"); sesh = Pluto.ServerSession(options=Pluto.Configuration.from_flat_kwargs(; pkgimages="no")); nb = Pluto.SessionActions.new(sesh; run_async=false); @info("shutting down notebook"); Pluto.SessionActions.shutdown(sesh, nb; async=false); @info("setup.py done");"') +os.system('julia --optimize=0 warmup_server.jl') diff --git a/start_server.jl b/start_server.jl new file mode 100644 index 0000000..ee04985 --- /dev/null +++ b/start_server.jl @@ -0,0 +1,18 @@ +import Pluto + +@assert haskey(ENV, "JSP_PORT") + +Pluto.run( + host="0.0.0.0", + port=get(ENV, "JSP_PORT", nothing), + + pkgimages="no", + + require_secret_for_open_links=false, + require_secret_for_access=false, + warn_about_untrusted_code=false, + + launch_browser=false, + dismiss_update_notification=true, + show_file_system=false, +) \ No newline at end of file diff --git a/start_server.sh b/start_server.sh new file mode 100644 index 0000000..8e04538 --- /dev/null +++ b/start_server.sh @@ -0,0 +1 @@ +julia --optimize=0 start_server.jl 2&>1 | tee pluto_server.log \ No newline at end of file diff --git a/warmup_server.jl b/warmup_server.jl new file mode 100644 index 0000000..b618a1b --- /dev/null +++ b/warmup_server.jl @@ -0,0 +1,17 @@ +@info("instantiate from setup.py") +import Pkg +Pkg.instantiate() + +@info("import Pluto from setup.py") +import Pluto + +@info("starting new notebook from setup.py") +sesh = Pluto.ServerSession(options=Pluto.Configuration.from_flat_kwargs(; + pkgimages="no", +)) +nb = Pluto.SessionActions.new(sesh; run_async=false) + + +@info("shutting down notebook from setup.py") +Pluto.SessionActions.shutdown(sesh, nb; async=false) +@info("setup.py done"); \ No newline at end of file From bdf77ca30dfd7c013641739128a4f9145b2f67f2 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Mon, 28 Oct 2024 10:43:27 +0100 Subject: [PATCH 07/14] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 63bbbe9..c791466 100644 --- a/Project.toml +++ b/Project.toml @@ -2,4 +2,4 @@ Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781" [compat] -julia = "1.10" +julia = "~1.10" From f752ccc194dce21ebd252b3dff50fb2e6b80f381 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Mon, 28 Oct 2024 10:43:35 +0100 Subject: [PATCH 08/14] optimze 2 --- setup.py | 2 +- start_server.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 61447bb..09a4ff2 100644 --- a/setup.py +++ b/setup.py @@ -16,4 +16,4 @@ # Start Pluto, open new notebook, shut down notebook. # This should precompile the PlutoRunner boot environment. import os -os.system('julia --optimize=0 warmup_server.jl') +os.system('julia --optimize=2 warmup_server.jl') diff --git a/start_server.sh b/start_server.sh index 8e04538..736ed86 100644 --- a/start_server.sh +++ b/start_server.sh @@ -1 +1 @@ -julia --optimize=0 start_server.jl 2&>1 | tee pluto_server.log \ No newline at end of file +julia --optimize=2 start_server.jl 2&>1 | tee pluto_server.log \ No newline at end of file From e9fae687905f2c8de9af6ef92dd63a485143fa4c Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Mon, 28 Oct 2024 11:27:08 +0100 Subject: [PATCH 09/14] asdf --- start_server.jl | 2 +- start_server.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/start_server.jl b/start_server.jl index ee04985..dcc4ff1 100644 --- a/start_server.jl +++ b/start_server.jl @@ -4,7 +4,7 @@ import Pluto Pluto.run( host="0.0.0.0", - port=get(ENV, "JSP_PORT", nothing), + port=parse(Int64, get(ENV, "JSP_PORT", nothing)), pkgimages="no", diff --git a/start_server.sh b/start_server.sh index 736ed86..bf1622e 100644 --- a/start_server.sh +++ b/start_server.sh @@ -1 +1 @@ -julia --optimize=2 start_server.jl 2&>1 | tee pluto_server.log \ No newline at end of file +julia --optimize=2 start_server.jl \ No newline at end of file From 56d2fb09bd0556a864038080a03e5517fb1b692f Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Mon, 28 Oct 2024 11:49:44 +0100 Subject: [PATCH 10/14] Update warmup_server.jl --- warmup_server.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/warmup_server.jl b/warmup_server.jl index b618a1b..a86008a 100644 --- a/warmup_server.jl +++ b/warmup_server.jl @@ -14,4 +14,7 @@ nb = Pluto.SessionActions.new(sesh; run_async=false) @info("shutting down notebook from setup.py") Pluto.SessionActions.shutdown(sesh, nb; async=false) -@info("setup.py done"); \ No newline at end of file +@info("setup.py done"); + + +error("DOES THIS EVEN WORK") From f4069c6479d859e60a8253b0deea71a042dba7f7 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Mon, 28 Oct 2024 12:02:34 +0100 Subject: [PATCH 11/14] Use postBuild instead of setup.py --- postBuild | 9 +++++++++ setup.py | 5 ----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 postBuild diff --git a/postBuild b/postBuild new file mode 100644 index 0000000..b6c1cb6 --- /dev/null +++ b/postBuild @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "hello from postBuild" + +set -e + +# Start Pluto, open new notebook, shut down notebook. +# This should precompile the PlutoRunner boot environment. +julia --optimize=2 warmup_server.jl diff --git a/setup.py b/setup.py index 09a4ff2..6817f18 100644 --- a/setup.py +++ b/setup.py @@ -12,8 +12,3 @@ }, install_requires=['jupyter-server-proxy @ git+http://github.com/fonsp/jupyter-server-proxy@470e13ae0f7a8961202c76ea6bcbcfd27ed07e6a'], ) - -# Start Pluto, open new notebook, shut down notebook. -# This should precompile the PlutoRunner boot environment. -import os -os.system('julia --optimize=2 warmup_server.jl') From 9563adde24b6da4d4ba6082dd46cbad1b186804c Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Mon, 28 Oct 2024 12:19:12 +0100 Subject: [PATCH 12/14] optimize 0 again --- postBuild | 2 +- start_server.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/postBuild b/postBuild index b6c1cb6..13e4680 100644 --- a/postBuild +++ b/postBuild @@ -6,4 +6,4 @@ set -e # Start Pluto, open new notebook, shut down notebook. # This should precompile the PlutoRunner boot environment. -julia --optimize=2 warmup_server.jl +julia --optimize=0 warmup_server.jl diff --git a/start_server.sh b/start_server.sh index bf1622e..3d06fe2 100644 --- a/start_server.sh +++ b/start_server.sh @@ -1 +1 @@ -julia --optimize=2 start_server.jl \ No newline at end of file +julia --optimize=0 start_server.jl \ No newline at end of file From 8a135edfa228b7e36d9731e92de7a312ad95e2ee Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Mon, 28 Oct 2024 12:19:30 +0100 Subject: [PATCH 13/14] refactor config file --- pluto_server_config.jl | 11 +++++++++++ postBuild | 6 +++--- start_server.jl | 12 ++---------- warmup_server.jl | 7 +------ 4 files changed, 17 insertions(+), 19 deletions(-) create mode 100644 pluto_server_config.jl diff --git a/pluto_server_config.jl b/pluto_server_config.jl new file mode 100644 index 0000000..a5a78d6 --- /dev/null +++ b/pluto_server_config.jl @@ -0,0 +1,11 @@ +( + pkgimages="no", + + require_secret_for_open_links=false, + require_secret_for_access=false, + warn_about_untrusted_code=false, + + launch_browser=false, + dismiss_update_notification=true, + show_file_system=false, +) \ No newline at end of file diff --git a/postBuild b/postBuild index 13e4680..eab0946 100644 --- a/postBuild +++ b/postBuild @@ -1,9 +1,9 @@ #!/bin/bash +set -ex echo "hello from postBuild" -set -e - +# Optimziation: # Start Pluto, open new notebook, shut down notebook. -# This should precompile the PlutoRunner boot environment. +# This should precompile the PlutoRunner boot environment, so it launches faster when opening the new notebook on the live binder. julia --optimize=0 warmup_server.jl diff --git a/start_server.jl b/start_server.jl index dcc4ff1..55b3b1d 100644 --- a/start_server.jl +++ b/start_server.jl @@ -2,17 +2,9 @@ import Pluto @assert haskey(ENV, "JSP_PORT") -Pluto.run( +Pluto.run(; host="0.0.0.0", port=parse(Int64, get(ENV, "JSP_PORT", nothing)), - pkgimages="no", - - require_secret_for_open_links=false, - require_secret_for_access=false, - warn_about_untrusted_code=false, - - launch_browser=false, - dismiss_update_notification=true, - show_file_system=false, + include("pluto_server_config.jl")..., ) \ No newline at end of file diff --git a/warmup_server.jl b/warmup_server.jl index a86008a..100a78d 100644 --- a/warmup_server.jl +++ b/warmup_server.jl @@ -6,15 +6,10 @@ Pkg.instantiate() import Pluto @info("starting new notebook from setup.py") -sesh = Pluto.ServerSession(options=Pluto.Configuration.from_flat_kwargs(; - pkgimages="no", -)) +sesh = Pluto.ServerSession(options=Pluto.Configuration.from_flat_kwargs(; include("pluto_server_config.jl")...)) nb = Pluto.SessionActions.new(sesh; run_async=false) @info("shutting down notebook from setup.py") Pluto.SessionActions.shutdown(sesh, nb; async=false) @info("setup.py done"); - - -error("DOES THIS EVEN WORK") From e97d692fdabc6a1a8bf9658029e863e58812ebd0 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Mon, 28 Oct 2024 12:19:40 +0100 Subject: [PATCH 14/14] optimize 1 for notebook process --- pluto_server_config.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/pluto_server_config.jl b/pluto_server_config.jl index a5a78d6..08ebd82 100644 --- a/pluto_server_config.jl +++ b/pluto_server_config.jl @@ -1,5 +1,6 @@ ( pkgimages="no", + optimize=1, require_secret_for_open_links=false, require_secret_for_access=false,