2022-10-01 17:30:14 -07:00
|
|
|
import os
|
|
|
|
import stat
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
c = get_config() # noqa: F821
|
2023-03-07 09:03:10 -08:00
|
|
|
|
2022-10-01 17:30:14 -07:00
|
|
|
c.ServerApp.ip = "0.0.0.0"
|
|
|
|
c.ServerApp.port = 8888
|
|
|
|
c.ServerApp.open_browser = False
|
2022-10-01 19:10:15 -07:00
|
|
|
c.ServerApp.root_dir = "/home/jovyan/notebooks"
|
2022-10-01 17:30:14 -07:00
|
|
|
|
|
|
|
# to output both image/svg+xml and application/pdf plot formats in the notebook file
|
|
|
|
c.InlineBackend.figure_formats = {"png", "jpeg", "svg", "pdf"}
|
|
|
|
|
|
|
|
# https://github.com/jupyter/notebook/issues/3130
|
|
|
|
c.FileContentsManager.delete_to_trash = False
|
|
|
|
|
|
|
|
# Change default umask for all subprocesses of the notebook server if set in
|
|
|
|
# the environment
|
|
|
|
if "NB_UMASK" in os.environ:
|
|
|
|
os.umask(int(os.environ["NB_UMASK"], 8))
|