Spaces:
Runtime error
Runtime error
File size: 790 Bytes
db5855f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import os
port = int(os.environ.get("JUPYTER_NOTEBOOK_PORT", "8080"))
c.NotebookApp.ip = "0.0.0.0"
c.NotebookApp.port = port
c.NotebookApp.open_browser = False
c.NotebookApp.quit_button = False
if os.environ.get("JUPYTERHUB_SERVICE_PREFIX"):
c.NotebookApp.base_url = os.environ.get("JUPYTERHUB_SERVICE_PREFIX")
password = os.environ.get("JUPYTER_NOTEBOOK_PASSWORD")
if password:
import notebook.auth
c.NotebookApp.password = notebook.auth.passwd(password)
del password
del os.environ["JUPYTER_NOTEBOOK_PASSWORD"]
image_config_file = "/opt/app-root/src/.jupyter/jupyter_notebook_config.py"
if os.path.exists(image_config_file):
with open(image_config_file) as fp:
exec(compile(fp.read(), image_config_file, "exec"), globals())
|