Container Application Deployment#

Important

Ensure that you have met the basic prerequisites before proceeding with the deployment.

Note

Manual deployment instructions are also available in the Manual Deployment section. However, NVIDIA recommends the automated deployment because it provides a streamlined process with minimal manual intervention.

  1. Create a directory (for example, ~/application) to store the resources and navigate to it.

    mkdir ~/application
    cd ~/application
    
  2. Download the applications-playbook.tar.gz file from the Local Developer Setup resource using an NGC API key.

    You can also download the file on the command line as follows, replacing the <API-KEY> placeholder with your NGC API key:

    curl -fsSLO "https://api.ngc.nvidia.com/v2/org/nvidia/team/holoscan-for-media/resources/local-developer-setup/versions/0.4.1/files/applications-playbook.tar.gz" -H "Authorization: Bearer <API-KEY>"
    
  3. Unarchive the downloaded package in the current directory.

    tar -xzvf applications-playbook.tar.gz
    
  4. Optional: Create a persistent volume claim (PVC) for Chrome Remote Desktop.

    You need a PVC for remote access to continue working when the pod restarts, because you can use an authorization code only once. If needed, follow the steps in the Chrome Remote Desktop section to create a PVC.

  5. Edit config.yaml to specify the PVC name if you created one, along with the other required settings, including:

    • h4m_ngc to override the NGC organization and team to download applications from (defaults to the nvidia organization and the holoscan-for-media team for correct downloads from public repositories)

    • rivermax_license_path to create a secret pointing to your Rivermax license file

    • scheduler_name (use default-scheduler for a local developer setup, and topo-aware-scheduler for a production deployment with OpenShift)

    • nmos_cpp_registry and nmos_controller to set appropriate IP addresses for your setup (for a local developer setup with a loopback cable, you can use the example static IP addresses)

  6. Activate the Python virtual environment that you created during the local developer or production platform setup.

  7. Get the Chrome Remote Desktop authorization code.

    To get the Chrome Remote Desktop authorization code:

    1. Navigate to https://remotedesktop.google.com/headless in your web browser.

    2. Under the Set up via SSH section, select Begin, then Next, and then Authorize.

      Picture of the Begin button when setting up SSH in the Chrome Remote Desktop window
    3. The page displays setup commands for various operating systems. Look for the section that contains the commands for Debian Linux.

      From the command shown, locate the value inside the code="" parameter and copy that part.

      Picture of the code page in the Chrome Remote Desktop window

      For example, from the command:

      DISPLAY= /opt/google/chrome-remote-desktop/start-host --code="4/0AVMBsJgg...-mbSFG25g" --redirect-url="https://remotedesktop.google.com/_/oauthredirect" --name=$(hostname)"
      

      Copy only 4/0AVMBsJgg...-mbSFG25g.

    Important

    The authorization code is only valid for five minutes. If it expires, generate a new one.

  8. To run the automation, use the following command:

    ANSIBLE_LOG_PATH=./application_$(date +'%Y%m%d_%H%M%S').log ansible-playbook install.yaml --extra-vars "NGC_API_KEY=<API-KEY> CHROME_REMOTE_DESKTOP_CODE=<CRD-CODE>" -vv
    

    where:

    • <API-KEY> is an NGC API key (the automation does not support legacy NGC API keys)

    • <CRD-CODE> is a Chrome Remote Desktop authorization code

    • The -vv flag enables verbose output for debugging. You can change it to -v for less detail or -vvv or -vvvv for increasingly more detailed logs.

Test Connection#

  1. Go to the Chrome Remote Desktop web interface at https://remotedesktop.google.com/access.

  2. Your remote computer appears in the list based on the hostname you specified for chrome-remote-desktop (default: myvirtualdesktop).

    Select the name to connect.

    Picture of the access page in the Chrome Remote Desktop window
  3. Enter the PIN you configured for chrome-remote-desktop (default: 123456) when prompted.

    Picture of the PIN page in the Chrome Remote Desktop window
  4. After connecting to Chrome Remote Desktop, select Application Finder in the dock at the bottom of the screen, search for Firefox, and select the icon to open it.

    Picture of the Application Finder page in the Chrome Remote Desktop window
  5. Navigate to the NMOS Controller UI at http://<controller-ui-ip-address>/, where <controller-ui-ip-address> is the high-speed network IP address that you specified at deployment time.

  6. In the NMOS Controller UI, the available devices appear in the left panel under Available.

    Picture of the available devices in the NMOS Controller UI

    Note

    If the devices do not appear in the NMOS Controller UI, check the logs of each pod:

    kubectl logs <pod-name>
    
  7. Drag the sender and receiver devices from the left panel to the empty canvas.

  8. Drag a link between the receiver and the sender to make a connection.

    Picture of the Holoscan for Media UI connection testing page
  9. After some time, disconnect the link between the sender and the receiver using the context menu. Check the video file saved in the workspace directory of the receiver container.

    Alternatively, you can copy the file to your local directory using the following command:

    kubectl cp <pod-name>:/workspace/recv.mp4 <destination-path>
    
    • Replace <pod-name> with the name of the receiver pod, which you can find using the following command:

      kubectl get pods | grep receiver
      
      NAME                                                              READY   STATUS    RESTARTS   AGE
      nvds-nmos-bin-receiver-nvds-nmos-bin-receiver-pipeline-dbd79rcb   1/1     Running   0          10m
      
    • Replace <destination-path> with the path to the directory where you want to save the file (for example, /home/user/recv.mp4).