Requirements and Installation ============================= .. _requirements_and_installation: This page describes the requirements and installation steps for Transfer Learning Toolkit (TLT). Hardware Requirements --------------------- TLT has the following hardware requirements: Minimum ^^^^^^^ * 4 GB system RAM * 4 GB of GPU RAM * Single core CPU * 1 NVIDIA GPU * 50 GB of HDD space Recommended ^^^^^^^^^^^ * 32 GB system RAM * 32 GB of GPU RAM * 8 core CPU * 1 NVIDIA V100 GPU * 100 GB of SSD space .. Note:: Currently TLT is not supported on GA-100 GPU’s. Software Requirements --------------------- TLT has the following software requirements: * Ubuntu 18.04 LTS * `NVIDIA GPU Cloud`_ account and API key * `docker-ce`_ * `nvidia docker`_ * NVIDIA GPU driver v410.xx or above .. _NVIDIA GPU Cloud: https://ngc.nvidia.com/ .. _docker-ce: https://docs.docker.com/install/linux/docker-ce/ubuntu/ .. _nvidia docker: https://github.com/NVIDIA/nvidia-docker .. Note:: DeepStream 5.0 - `NVIDIA SDK for IVA inference`_ is recommended. .. _NVIDIA SDK for IVA inference: https://developer.nvidia.com/deepstream-sdk .. _install_prereq: Installation Prerequisites -------------------------- Perform the following prerequisite steps before installing TLT: 1. Install `Docker`_. 2. Install `NVIDIA GPU driver`_ v410.xx or above. 3. Install `nvidia docker`_ 4. Get an `NGC`_ account and API key: a. Go to NGC and click the **Transfer Learning Toolkit** container in the **Catalog** tab. This message is displayed: "Sign in to access the PULL feature of this repository". b. Enter your Email address and click **Next**, or click **Create an Account**. c. Choose your organization when prompted for **Organization/Team**. d. Click **Sign In**. e. Select the **Containers** tab on the left navigation pane and click the **Transfer Learning Toolkit** tile. 5. Download the Docker container. 6. Execute :code:`docker login nvcr.io` from the command line and enter these login credentials: a. Username: "$oauthtoken" b. Password: "YOUR_NGC_API_KEY" 7. Execute :code:`docker pull nvcr.io/nvidia/tlt-streamanalytics:`. .. _Docker: https://www.docker.com/ .. _NVIDIA GPU driver: https://www.nvidia.com/Download/index.aspx?lang=en-us .. _NGC: https://ngc.nvidia.com/ Installation ------------ The Transfer Learning Toolkit (TLT) is available to download from the NGC. You must have an NGC account and an API key associated with your account. See the :ref:`Installation Prerequisites` section for details on creating an NGC account and obtaining an API key. Running the Transfer Learning Toolkit ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use this procedure to run the Transfer Learning Toolkit. Run the toolkit *************** Run the toolkit using the following command. Docker starts in the :code:`/workplace` folder by default. .. code-block:: bash docker run --runtime=nvidia -it nvcr.io/nvidia/tlt-streamanalytics: /bin/bash Access local directories ************************ To access local directories from inside Docker, you need to mount them in Docker. Use the option :code:`-v :` to mount local directories in docker. For example, the command to run the toolkit mounting :code:`/home//tlt-experiments` directory in your disk to :code:`/workspace/tlt-experiments` in Docker would be as follows: .. code-block:: bash docker run --runtime=nvidia -it -v /home//tlt-experiments:/workspace/tlt-experiments nvcr.io/nvidia/tlt-streamanalytics: /bin/bash It is useful to mount separate volumes for the dataset and the experiment results so that they persist outside of Docker. In this way, the data is preserved after Docker is closed. Any data that is generated to, or referred from a directory inside the docker, will be lost if it is not either copied out of the docker, or written to or read from volumes outside of the docker. Use the examples **************** Examples of DetectNet_v2, SSD, DSSD, RetinaNet, YOLOv3 and FasterRCNN with ResNet18 backbone for detecting objects that are available as Jupyter Notebooks. To run the examples that are available, enable the jupyter notebook included in Docker to run in your browser: .. code-block:: bash docker run --runtime=nvidia -it -v /home//tlt-experiments:/workspace/tlt-experiments -p 8888:8888 nvcr.io/nvidia/tlt-streamanalytics: Go to the examples folder: :code:`cd examples/`. Execute this command from inside Docker to start the jupyter notebook: .. code-block:: bash jupyter notebook --ip 0.0.0.0 --allow-root Copy and paste the link produced from this command into your browser to access the notebook. The /workspace/examples folder will contain a demo notebook. .. Note:: For all the detector notebooks, the ``tlt-train`` tool does not support training on images of multiple resolutions, or resizing images during training. All of the images must be resized offline to the final training size and the corresponding bounding boxes must be scaled accordingly. Downloading the Models ^^^^^^^^^^^^^^^^^^^^^^ .. _downloading_the_models: The Transfer Learning Toolkit Docker gives you access to a repository of pretrained models that can serve as a starting point when training deep neural networks. These models are hosted on the NGC. The TLT docker interfaces with NGC via the NGC Catalog CLI. More information about the NGC Catalog CLI is available `here`_. Please follow the instructions given here to configure the NGC CLI and download the models. .. _here: https://docs.nvidia.com/ngc/ngc-catalog-cli-user-guide/index.html" Configure the NGC API key ************************* Using the NGC API Key obtained in :ref:`Installation Prerequisites`, configure the enclosed ngc cli by executing this command and following the prompts: .. code-block:: bash ngc config set Get a list of models ******************** Use this command to get a list of models that are hosted in the NGC model registry: .. code-block:: bash ngc registry model list Here is an example of using this command: .. code-block:: bash ngc registry model list nvidia/tlt_pretrained_* .. Note:: All our classification models have names based on this template: ``nvidia/tlt_pretrained_classification: