.. _`tensorflow-quickstart`: ====================== TensorFlow Quick Start ====================== .. contents:: :depth: 1 :local: .. admonition:: Compute Resources - Have questions or need help with compute, including activation or issues? Follow `this link. `__ - :ref:`User Agreement ` .. _`tensorflow-quickstart-docker`: .. admonition:: Docker Usage - The information on this page assumes that you have a knowledge base of using Docker to create images and push them to a repository for use. If you need to review that information, please see the links below. - :ref:`Docker and the RIS Compute Service ` - :ref:`Docker Basics: Building, Tagging, & Pushing A Custom Docker Image ` .. _`tensorflow-quickstart-software`: Software Included ----------------- - noVNC (https://novnc.com/info.html) - Python (https://www.python.org) - TensorFlow (https://www.tensorflow.org) .. _`tensorflow-quickstart-gui`: Interactive GUI Session ----------------------- - Interactions GUI sessions are done via the ``Custom noVNC Image`` application in Open On Demand (OOD). - You can find out more about OOD here: :ref:`Compute Quick Start `. - There are two fields beyond the basics that will need information specific to this image. - Environment Variables - Docker Image Environment Variables ~~~~~~~~~~~~~~~~~~~~~ - This information should be space separated in the field. .. code:: PASSWORD=password - Optional variables - GUI display size. This can be changed with the following variables. - Width default: 1024 - Height default: 768 .. code:: DISPLAY_WIDTH= DISPLAY_HEIGHT= Docker Image ~~~~~~~~~~~~ .. code:: gcr.io/ris-registry-shared/tensorflow: .. _`rstudio-docker-tag`: .. admonition:: TensorFlow Docker Tag The ```` will refer to the version of Tensorflow in the Docker container. Please click :ref:`here ` see a current list of supported TensorFlow versions and their corresponding tags. - Fill out the rest of the fields with the appropriate information (explained in the quick start). - You will need to select a GPU in the field for doing so since TensorFlow uses GPUs. - Launch the job through the methods described in the quick start. - Once in an interactive TensorFlow session using the following command: .. code:: > ipython -i --no-banner Interactive Command-Line Session ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - If you wish to use TensorFlow in an interactive command-line session, you can do so with the following command. .. code:: bsub -Is -R 'gpuhost' -gpu "num=1" -q general-interactive -a 'docker(gcr.io/ris-registry-shared/tensorflow:)' /bin/bash .. _`tensorflow-quickstart-extend`: 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 ~~~~~~~~~~ .. code:: FROM gcr.io/ris-registry-shared/tensorflow:latest RUN pip install pandas matplotlib - Please see this :ref:`section ` for more information on building and pushing your own custom Docker container. .. _`tensorflow-quickstart-versions`: Supported TensorFlow Versions ----------------------------- ====================== ===================== **Version** **Docker Image Tag** ---------------------- --------------------- 2.6.0 (Python 3.8.10) latest, 21.10-tf2-py3 ====================== =====================