Issue:
Some customers are curious how they can define or set configurations for Jupyter Notebook for their Compute Environment, referencing config files like https://jupyter-notebook.readthedocs.io/en/stable/config.html
Root Cause:
Rather than needing to repeat some steps every time you start a new workspace or job, you can set configs via a Compute Environment.
Resolution:
You can make modifications via Dockerfile instructions or via Pre-Run scripts. For example if you want to specify an Application.log_level per https://jupyter-notebook.readthedocs.io/en/stable/config.html :
Dockerfile instructions
RUN mkdir -p /home/ubuntu/.jupyter && printf '\nc.Application.log_level = 30\n' >> /home/ubuntu/.jupyter/jupyter_notebook_config.py
RUN mkdir -p /home/ubuntu/.jupyterlab && printf '\nc.Application.log_level = 30\n' >> /home/ubuntu/.jupyterlab/jupyter_lab_config.py
Pre-Run scripts
mkdir -p /home/ubuntu/.jupyter
printf '\nc.Application.log_level = 30\n' >> /home/ubuntu/.jupyter/jupyter_notebook_config.py
mkdir -p /home/ubuntu/.jupyterlab
printf '\nc.Application.log_level = 30\n' >> /home/ubuntu/.jupyterlab/jupyter_lab_config.py
Notes/Information:
Pro-tip: Test your instructions or commandline scripts within a running workspace's terminal first to confirm syntax prior to adding them to your Compute Environment.
Comments
0 comments
Please sign in to leave a comment.