We often want to troubleshoot an app quickly, and we want to do so without having to launch the app using the default function in Domino constantly. This is where we can launch it directly from within a Workspace and access it. It makes troubleshooting much more efficient and develops quicker.
We will use the following environment (Ubuntu18_DAD_Py3.8_R4.0-20210126), but we will almost always want to make sure JupyterLab and Jupiter Server Proxy are the latest versions. Let’s start by editing the docker file associated with your environment and add the following.
# Update JupyterLab and jupyter-server-proxy top the latest version
RUN pip uninstall --yes jupyterlab && \
pip install jupyterlab && \
pip uninstall --yes jupyter-server-proxy && \
pip install jupyter-server-proxy && \
pip install jupyter-dash && \
jupyter labextension update --all && \
jupyter lab build
Once that is done, open your project and launch a workspace using JupyterLab with the environment you just created/updated.
Inside JupyterLab, open a Terminal (File -> New -> Terminal) and wget our Example file.
curl https://raw.githubusercontent.com/dominopetter/domino-example-codes/main/jupyter_dash_notebook.ipynb --output demo.ipynb
Open this file in a Jupyter Notebook and run each cell individually and then watch the result appear inline below all the code once you run the app.run_server line.
Have a powerful day!