Updated 2021-05-17
Run TensorBoard Interactively¶
Overview¶
- Running TensorBoard on the cluster is a multi step step process that is similar to running other interactive software:
- Install Tensorflow into your Conda Env
- Set up VNC Interactive Session
- Set up tunnel for VNC viewer so you can access the interactive job
- Load Tensorflow module (or install tensorflow into a conda environment, more details below)
Install TensorBoard into Conda Env¶
Important
- Instead of installing TensorFlow into a conda environment, you can just use
module avail tensorflow
to list modules, and load a tensorflow module of your choice withmodule load tensorflow-gpu
replacingtensorflow-gpu
with whatever version you prefer. Loading the tensorflow module lets you use tensorboard without having to install it into a conda environment tensorflow-gpu/2.0
is only supported on RHe7 queues
Warning
Before loading the anaconda
module, make sure you have set up the correct symlinks for the .conda
file. Follow the Conda Environment Guide for information to do so.
- After you have set up the symlinks, you can either create a new conda env with Tensorflow or install Tensorflow into an exisiting environment
- Load the Anaconda module with
module load anaconda3/2019.10
- Create a new Conda Environment that includes Tensorflow:
#Tensorflow CPU
conda create -n tensorflow_env tensorflow #replace "tensorflow_env with whatever you want to name the env
#Tensorflow GPU
conda create -n tensorflow_gpuenv tensorflow-gpu #replace tensorflow_gpu with whatever you want to name the env
- To install in an exisiting env:
- Use
pip install
orconda install
- To Start env use
source activate <your env name>
- To quit using env run:
source deactivate <your env name>
- For more information on how to create, run, and use conda environments, check out the conda env guide
Setup VNC Session¶
- Please see the VNC guide for instructions on how to set up the Interactive VNC session
Load Tensorflow Module¶
- In the VNC window, open a terminal by clicking top left
Applications
>System Tools
> scroll down toterminal
. Once you scroll down toterminal
you can also right click it to add it to the desktop and top bar for easy access
Tip
Once you scroll down to terminal
in the drop down menu, you can also right click it to add it to the desktop and top bar for easy access
- All commands here on will be typed in terminal in VNC
- To see available versions of tensorflow run
module avail tensorflow
module load <version of tensorflow> #Recommended: module load tensorflow-gpu/2.0 (only on RHe7)
Load Anaconda Module and Conda Env (if using TF in conda env)¶
- If you are using tensorflow within a conda environment, follow these steps
- In the VNC window, open a terminal by clicking top left
Applications
>System Tools
> scroll down toterminal
. Once you scroll down toterminal
you can also right click it to add it to the desktop and top bar for easy access
Tip
Once you scroll down to terminal
in the drop down menu, you can also right click it to add it to the desktop and top bar for easy access
- All commands here on will be typed in terminal in VNC
- To see available versions of anaconda run
module avail anaconda
- Load anaconda module
module load <version of anaconda> #Recommended: module load anaconda3/2019.10
- Load your conda env that has Tensorflow with
source activate <your conda env name>
Run TensorBoard¶
- You can now run TensorBoard as you would normally
- Run
tensorboard --logdir=<your path to event logs>
- Open
firefox
in the VNC Session by clicking on the firefox icon in the top bar - Paste the address generated by running
tensorboard
into firefox to go to the tensorboard site - Alternatively, you can just click the link in the terminal
Note
Important: Tensorboard might not render properly on RHEL6, the following screenshot was taken on RHEL7
Congratulations! You have successfully ran Tensorboard interactively on the cluster