Skip to content

Commit

Permalink
Include extra configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
nmearl committed Aug 9, 2023
1 parent a464f88 commit f05e51b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jupyter_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"VoilaConfiguration": {
"template": "",
"enable_nbextensions": true,
"file_whitelist": [".*"],
"show_tracebacks": true,
"http_keep_alive_timeout": 30,
"iopub_timeout": 100
}
}
37 changes: 37 additions & 0 deletions jupyter_server_config_extra.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import os
from pathlib import Path

import hubbleds

NB_PATH = Path(hubbleds.__file__).parent / "HubbleDS.ipynb"
SERVICE_PREFIX = os.environ["JUPYTERHUB_SERVICE_PREFIX"]


c.ServerProxy.servers = {
"test-server": {
"command": ["python", "-m", "http.server", "{port}"],
"absolute_url": False,
"launcher_entry": {"title": "Test Server"},
},
"hubble": {
"command": [
"voila",
f"{NB_PATH.resolve()}",
"--port={port}",
"--no-browser",
"--debug",
"--Voila.base_url={base_url}hubble/",
"--Voila.server_url=/",
"--Voila.tornado_settings={{'allow_origin': '*'}}",
"--VoilaConfiguration.template=cosmicds-default",
"--VoilaConfiguration.enable_nbextensions=true",
"--VoilaConfiguration.file_whitelist=['.*']",
"--VoilaConfiguration.show_tracebacks=true",
"--VoilaConfiguration.http_keep_alive_timeout=30",
"--VoilaConfiguration.iopub_timeout=100",
],
"absolute_url": False,
"launcher_entry": {"title": "Hubble Data Story"},
"timeout": 15
},
}
3 changes: 3 additions & 0 deletions postBuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
pwd
ls -lrt

cp jupyter_config.json /etc/jupyter
cat /etc/jupyter/jupyter_server_config_extra.py >> /etc/jupyter/jupyter_server_config.py

Expand Down

0 comments on commit f05e51b

Please sign in to comment.