Auto-deploy analysis notebook as Livebook app
Add app_settings metadata to notebook and set LIVEBOOK_APPS_PATH so it shows up under Apps on the Livebook home page.
This commit is contained in:
parent
548e277bec
commit
3cc4301855
2 changed files with 6 additions and 3 deletions
|
|
@ -10,7 +10,6 @@ set -e
|
|||
COOKIE="microwaveprop_nb"
|
||||
NODE="prop@$(hostname -s)"
|
||||
PORT="${LIVEBOOK_PORT:-8081}"
|
||||
NOTEBOOK="notebooks/algorithm_analysis.livemd"
|
||||
|
||||
echo "Starting Phoenix on :4000 and Livebook on :${PORT}..."
|
||||
echo "Livebook will be at http://localhost:${PORT}"
|
||||
|
|
@ -24,11 +23,13 @@ PHOENIX_PID=$!
|
|||
sleep 3
|
||||
|
||||
# Start Livebook attached to the Phoenix node
|
||||
# LIVEBOOK_APPS_PATH makes notebooks show up under "Apps" on the home page
|
||||
LIVEBOOK_HOME="$(pwd)/notebooks" \
|
||||
LIVEBOOK_APPS_PATH="$(pwd)/notebooks" \
|
||||
LIVEBOOK_APPS_PATH_HUB_ID="personal-hub" \
|
||||
livebook server \
|
||||
--port "$PORT" \
|
||||
--default-runtime "attached:${NODE}:${COOKIE}" \
|
||||
--open "$NOTEBOOK" &
|
||||
--default-runtime "attached:${NODE}:${COOKIE}" &
|
||||
LIVEBOOK_PID=$!
|
||||
|
||||
# Trap ctrl-c to kill both
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
<!-- livebook:{"app_settings":{"slug":"analysis","auto_shutdown_ms":3600000}} -->
|
||||
|
||||
# Propagation Algorithm Analysis
|
||||
|
||||
## Setup — Attach to Running Node
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue