jupyter_notebook_config.py 711 B

12345678910111213141516171819202122232425262728
  1. lab_command = ' '.join([
  2. 'jupyter',
  3. 'lab',
  4. '--debug',
  5. '--no-browser',
  6. '--port={port}',
  7. '--NotebookApp.token=""',
  8. '--NotebookApp.base_url={base_url}lab-dev',
  9. # Disable dns rebinding protection here, since our 'Host' header
  10. # is not going to be localhost when coming from hub.mybinder.org
  11. '--NotebookApp.allow_remote_access=True'
  12. ])
  13. c.ServerProxy.servers = {
  14. 'lab-dev': {
  15. 'command': [
  16. '/bin/bash', '-c',
  17. # Redirect all logs to a log file
  18. f'{lab_command} >jupyterlab-dev.log 2>&1'
  19. ],
  20. 'absolute_url': True
  21. }
  22. }
  23. c.NotebookApp.default_url = '/lab-dev'
  24. import logging
  25. c.NotebookApp.log_level = logging.DEBUG