TensorBoard is a tool for visualizing TensorFlow data. TensorBoard operates by reading events files, which contain summary data that generated by TensorFlow. You can visualize your TensorFlow graph, plot quantitative metrics about graph, and show additional data that passes through the graph.
You can use TensorBoard inside your Domino Jupyter workspace by installing and enabling the Jupyter-TensorBoard server extension in your compute environment.
You will need to create or modify an environment to enable this extension in your Domino workspaces. Read about Compute Environment Management if you aren’t already familiar.
-
In Domino, click Environments in the top navigation bar.
-
Click Create Environment.
-
Give the environment an informative name, and then choose a base image that has Python 3.8 installed. You can use an environment as a base image if it uses this Domino standard:
quay.io/domino/standard-environment:ubuntu18-py3.8-r4.1-gpu-domino4.6
-
After selecting the appropriate base image, choosing a visibility setting, and optionally providing a description, click Create Environment to finalize.
-
The environment will be created and you will be automatically redirected to its Overview page. Scroll down to the Docker Settings and click Edit Dockerfile.
-
Add the following lines to the Dockerfile Instructions:
USER root RUN apt-get update RUN apt-get install -y nodejs RUN npm install -g configurable-http-proxy RUN pip install -U jupyter jupyter-tensorboard RUN pip install jupyter-server-proxy RUN jupyter labextension install @jupyterlab/server-proxy @jupyter-widgets/jupyterlab-manager RUN jupyter nbextension enable --py widgetsnbextension USER ubuntu
-
Add the following lines to the Pre-run script if the project you plan on using this compute environment is DFS-based:
tensorboard \ --host 127.0.0.1 \ --port 6006 \ --logdir /domino/datasets/local/$\{DOMINO_PROJECT_NAME}/tensorboard_logs \ --path_prefix /${DOMINO_PROJECT_OWNER}/${DOMINO_PROJECT_NAME}/notebookSession/${DOMINO_RUN_ID}/Tensorboard & cat << EOF >> /home/ubuntu/.jupyter/jupyter_notebook_config.py c.ServerProxy.servers = { "Tensorboard": { 'command': ['configurable-http-proxy', '--ip', '127.0.0.1', '--port', '{port}', '--default-target=http://127.0.0.1:6006/${DOMINO_PROJECT_OWNER}/${DOMINO_PROJECT_NAME}/notebookSession/${DOMINO_RUN_ID}/Tensorboard/'] } } EOF
-
Add the following lines to the Pre-run script if the project is a Git-based project with CodeSync:
tensorboard \ --host 127.0.0.1 \ --port 6006 \ --logdir /mnt/data/$\{DOMINO_PROJECT_NAME}/tensorboard_logs \ --path_prefix /${DOMINO_PROJECT_OWNER}/${DOMINO_PROJECT_NAME}/notebookSession/${DOMINO_RUN_ID}/Tensorboard & cat << EOF >> /home/ubuntu/.jupyter/jupyter_notebook_config.py c.ServerProxy.servers = { "Tensorboard": { 'command': ['configurable-http-proxy', '--ip', '127.0.0.1', '--port', '{port}', '--default-target=http://127.0.0.1:6006/${DOMINO_PROJECT_OWNER}/${DOMINO_PROJECT_NAME}/notebookSession/${DOMINO_RUN_ID}/Tensorboard/'] } } EOF
-
Click Build.
You will be redirected to the Revisions page for the environment. If the new revision builds successfully, you are ready to use this environment.
-
Open the project you want to use with Jupyter-Tensorboard.
-
In the navigation pane, click Settings.
-
From Compute environment, select the environment you created previously. A notification opens to verify that the new environment is now set.
-
In the navigation pane, click Workspaces, then select Jupyterlab and launch a new workspace.
-
Select Tensorboard from the Launcher.
See the TensorBoard README to learn how to start consuming TensorFlow events.
-
If you encounter issues loading Tensorboard initially, confirm that Tensorflow is operating properly. Loading the UI has a dependency on Tensorflow.
-
By default, Domino’s standard compute environments have
tensorflow-gpu
installed (for example,pip install tensorflow-gpu
). Therefore, Tensorboard and Tensorflow will not work on a CPU hardware tier. If you’d like to use Tensorboard on a CPU make sure that CPU optimized Tensorflow is installed (for example,pip install tensorflow
).- Tensorboard.png
-