TensorFlow Quick Start
Software Included
-
noVNC (https://novnc.com/info.html)
-
Python (https://www.python.org)
-
TensorFlow (https://www.tensorflow.org)
Interactive GUI Session
Please use the following commands to submit an interactive GUI session for TensorFlow.
export PASSWORD=password export LSF_DOCKER_PORTS='8080:8080' bsub -Is -R 'select[gpuhost,port8080=1]' -gpu "num=1" -q general-interactive -a 'docker(gcr.io/ris-registry-shared/tensorflow:<tag>)' supervisord -c /app/supervisord.conf
-
Since LSF is running interactively, it will output the name of the host it’s running on in the terminal.
-
The host will be the IP address needed to access the VNC.
-
For example:
<<Starting on compute1-exec-187.ris.wustl.edu>>
translates to the IP beinghttps://compute1-exec-187.compute.ris.wustl.edu:8080/vnc.html
. -
The password will be what was set above with the
export PASSWORD=
command. -
Please see our documentation for more information on selecting a port.
-
Open an interactive iPython session using the following command:
> ipython -i --no-banner
GUI Session Variables
-
You can change the GUI display size by clicking on the settings icon on the left of the browser and selecting ‘Local Scaling’ from the Scaling Mode dropdown. Click the settings icon again to resume the session.
-
The display height and width can also be changed by passing them as variables.
export DISPLAY_WIDTH=<width> (default is 1024) export DISPLAY_HEIGHT=<height> (default is 768)
Interactive Command-Line Session
-
If you wish to use TensorFlow in an interactive command-line session, you can do so with the following command.
bsub -Is -R 'gpuhost' -gpu "num=1" -q general-interactive -a 'docker(gcr.io/ris-registry-shared/tensorflow:<tag>)' /bin/bash
Extend the TensorFlow Image
You may wish to extend the TensorFlow container with additional Python packages. Below is an example Dockerfile which extends the latest RIS-hosted TensorFlow image with the following packages:
-
pandas (https://pandas.pydata.org/)
-
matplotlib (https://matplotlib.org/)
Dockerfile
FROM gcr.io/ris-registry-shared/tensorflow:latest RUN pip install pandas matplotlib
-
Please see this section for more information on building and pushing your own custom Docker container.
Supported TensorFlow Versions
Version |
Docker Image Tag |
2.6.0 (Python 3.8.10) |
latest, 21.10-tf2-py3 |