### Install Tokkio with Deployment Script Source: https://docs.nvidia.com/ace/tokkio/5.0/quickstart-guide This script installs Tokkio using a configuration file. It requires the `envbuild.sh` script and a YAML configuration file. The output provides crucial access URLs and SSH commands for interacting with the deployed application. ```shell ./envbuild.sh install --tf-binary terraform --component all --config-file ./ ``` -------------------------------- ### Installation Output Example Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/aws-setup Sample output from the installation process, showing access URLs for various services and SSH commands for accessing instances. This output is crucial for post-installation verification and access. ```yaml access_urls: ace_configurator_endpoint: "https://." api_endpoint: "https://." grafana_endpoint: "https://." ui_endpoint: "https://." ssh_command: app: bastion: ssh -i /home/my-user/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null @ master: ssh -i /home/my-user/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ProxyCommand="ssh -i /home/my-user/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -W %h:%p @" @ turn: master: ssh -i /home/my-user/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null @ ``` -------------------------------- ### Execute TURN Server Setup Script (Bash) Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/bare-metal-manual-setup Makes the setup script executable and then runs the installation command for the coturn service using sudo. ```bash chmod u+x ./setup-coturn.sh sudo -E ./setup-coturn.sh install ``` -------------------------------- ### Create COTURN Setup Script Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/bare-metal-manual-setup Generates a bash script to install and configure the COTURN TURN server. This script handles package installation, network configuration, credential setup, and service management for NAT traversal. ```bash #!/bin/bash if [ $1 == 'install' ]; then echo "Setup coturn server -- Start" DEBIAN_FRONTEND=noninteractive apt-get update -y apt-get install -y coturn if [ -n "$TURNSERVER_PUBLIC_IP" ] && [ -n "${TURNSERVER_PRIVATE_IP}" ]; then EXTERNAL_IP="${TURNSERVER_PUBLIC_IP}/${TURNSERVER_PRIVATE_IP}" elif [ -z "$TURNSERVER_PUBLIC_IP" ] && [ -n "${TURNSERVER_PRIVATE_IP}" ]; then EXTERNAL_IP="${TURNSERVER_PRIVATE_IP}" else echo "TURNSERVER_PRIVATE_IP variable ${TURNSERVER_PRIVATE_IP} is not set" fi sed \ -e "s|^#TURNSERVER_ENABLED=1|TURNSERVER_ENABLED=1|g" \ -i /etc/default/coturn sed \ -e "/^#\?listening-port=/d" \ -e "/^#\?listening-ip=/d" \ -e "/^#\?external-ip=/d" \ -e "/^#\?relay-ip=/d" \ -e "/^#\?min-port=/d" \ -e "/^#\?max-port=/d" \ -e "/^#\?fingerprint/d" \ -e "/^#\?realm=/d" \ -e "/^#\?user=/d" \ -e "/^#\?log-file=/d" /etc/turnserver.conf \ -i /etc/turnserver.conf cat <> /etc/turnserver.conf listening-port=3478 listening-ip=${TURNSERVER_PRIVATE_IP} external-ip=${EXTERNAL_IP} relay-ip=${TURNSERVER_PRIVATE_IP} min-port=49152 max-port=65535 fingerprint realm=${TURNSERVER_REALM} user=${TURNSERVER_USERNAME}:${TURNSERVER_PASSWORD} log-file=/var/tmp/turn.log EOT systemctl restart coturn echo "Setup coturn server -- End" else systemctl stop coturn DEBIAN_FRONTEND=noninteractive apt-get purge coturn -y rm -rf /etc/turnserver.conf fi ``` -------------------------------- ### Install UI Dependencies and Build Source: https://docs.nvidia.com/ace/tokkio/5.0/microservices/ui/deployment This sequence installs the necessary Node.js dependencies for the UI and builds the project. It involves navigating to the vst-streaming-lib directory, installing its dependencies, building it, and then installing the main UI dependencies. ```bash cd vst-streaming-lib npm install npm run build cd .. npm install ``` -------------------------------- ### Review Tokkio Installation Details Source: https://docs.nvidia.com/ace/tokkio/5.0/quickstart-guide This command allows users to review the installation details and access URLs previously provided by the deployment script. It uses the `envbuild.sh` script with the `info` command and requires the same configuration file as the installation. The output is identical to the initial deployment output, showing access URLs and SSH commands. ```shell ./envbuild.sh info --tf-binary terraform --config-file ./ ``` -------------------------------- ### Install Local Path Provisioner Helm Chart (Bash) Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/bare-metal-manual-setup Installs or upgrades the local-path-provisioner Helm chart in the 'platform' namespace, using a specified values file and chart version. ```bash helm upgrade --install local-path-provisioner containeroo/local-path-provisioner \ --namespace platform \ --create-namespace \ --version 0.0.32 \ -f /tmp/local-path-provisioner-values.yml ``` -------------------------------- ### STUN/TURN Server Configuration Example (Shell) Source: https://docs.nvidia.com/ace/tokkio/5.0/troubleshooting/index An example snippet showing how to configure STUN or TURN server URIs, username, and password for connection testing. This is typically used within a Trickle ICE testing tool. ```shell STUN or TURN URI: turn:15.266.16.245:3478 TURN username: coturn-admin TURN password: "Uq3CFRYKr6rFVFcc ``` -------------------------------- ### Start Tokkio UI Development Server Source: https://docs.nvidia.com/ace/tokkio/5.0/microservices/ui/deployment This command starts the UI development server, making the Tokkio UI accessible in your browser. The UI will be available at http://:3000. ```bash npm run dev ``` -------------------------------- ### Verify Tokkio Installation with kubectl Source: https://docs.nvidia.com/ace/tokkio/5.0/quickstart-guide After installation, this command verifies that all Kubernetes pods associated with the Tokkio application are running as expected. It requires `kubectl` to be configured for the correct Kubernetes cluster. The output lists all pods and their status, indicating a successful deployment if all are 'Running'. ```shell ssh @ kubectl get pods -n app ``` -------------------------------- ### Install Observability Stack Helm Chart (Bash) Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/bare-metal-manual-setup Installs or upgrades the observability stack Helm chart in the 'platform' namespace, using a specific chart version. ```bash helm upgrade --install obs \ nvidia-ace/ucf-foundational-chart-observability-stack \ --version 0.0.6 \ --namespace platform \ --create-namespace ``` -------------------------------- ### Prepare Deployment Configuration YAML Source: https://docs.nvidia.com/ace/tokkio/5.0/quickstart-guide Copies and prepares the main configuration template file for deployment. This involves copying `config-template.yml` to a custom name and moving it to the appropriate directory. Further customization of the renamed file is required. ```bash cp config-template.yml mv ../.. cd ../.. ``` -------------------------------- ### Extract and Navigate UI Source Code Source: https://docs.nvidia.com/ace/tokkio/5.0/microservices/ui/deployment These commands extract the downloaded UI source code archive and navigate into the source directory. This prepares the environment for dependency installation. ```bash cd tokkio-ui-source-code_v6.6.16 tar -xvzf tokkio-ui.tar.gz cd tokkio-ui ``` -------------------------------- ### Install NVIDIA Cloud Native Stack Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/bare-metal-manual-setup Executes the CNS installation script to set up Kubernetes, NVIDIA GPU Operator, GPU Driver, Containerd, and NVIDIA Container Toolkit. This process can take a significant amount of time. ```bash bash setup.sh install ``` -------------------------------- ### Install Tokkio Helm Chart Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/bare-metal-manual-setup Installs the Tokkio Helm chart using `helm upgrade --install`. It specifies the namespace, authentication credentials (NGC CLI API key), the override values file, and the chart's repository URL. This command deploys the Tokkio application with the defined configurations. ```bash helm upgrade \ --install \ --reset-values \ --create-namespace \ --namespace app \ --username '$oauthtoken' \ --password "${NGC_CLI_API_KEY}" \ --values /tmp/ucf-tokkio-audio-video-app.yml \ tokkio-app \ https://helm.ngc.nvidia.com/nvidia/ace/charts/tokkio-1stream-with-ui-5.0.0-GA.tgz ``` -------------------------------- ### Configure Tokkio Deployment Environment Variables Source: https://docs.nvidia.com/ace/tokkio/5.0/quickstart-guide Sets up the necessary environment variables for the Tokkio 5.0 deployment by sourcing a configuration file. This file contains API keys and host information. Ensure all placeholder values are replaced with actual credentials and IP addresses. ```bash cd config-template-examples/tokkio-1stream nano my-config.env # Inside my-config.env: export OPENAI_API_KEY="" export NGC_CLI_API_KEY="" export NVIDIA_API_KEY="" export APP_HOST_IPV4_ADDR="" export APP_HOST_SSH_USER="" export COTURN_HOST_IPV4_ADDR="" export COTURN_HOST_SSH_USER="" export ELEVENLABS_API_KEY="" source my-config.env ``` -------------------------------- ### Configure Local Helm Chart Installation Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/common-setup-procedures This configuration snippet shows how to enable and specify parameters for installing a Helm chart from a local directory. It includes enabling the local chart, setting the path to the chart, and listing user-defined override value files. Ensure the `enable` flag is set to `true` for this configuration to take effect. ```yaml app: configs: app_settings: helm_chart: local: enable: true path: /home/myuser/custom-charts/my-app-1.0.0 user_value_override_files: - "/home/myuser/custom-charts/my-app-override-values-one.yaml" - "/home/myuser/custom-charts/my-app-override-values-two.yaml" ``` -------------------------------- ### Run Tokkio Installation Command Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/aws-lite-setup This is the primary command to initiate the installation of Tokkio 5.0. It utilizes the `envbuild.sh` script with specified Terraform binary, components to install ('all'), and the custom configuration file. ```shell ./envbuild.sh install --tf-binary terraform --component all --config-file ./my-config.yml ``` -------------------------------- ### Clone NVIDIA ACE GitHub Repository Source: https://docs.nvidia.com/ace/tokkio/5.0/quickstart-guide Clones the NVIDIA ACE GitHub repository to obtain deployment scripts. This is a prerequisite for setting up the Tokkio 5.0 deployment on the controller instance. No specific inputs are required other than network access. ```bash git clone https://github.com/NVIDIA/ACE.git cd ACE/workflows/tokkio/5.0.0-ga/scripts/one-click/baremetal ``` -------------------------------- ### Prepare and Copy Configuration File Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/gcp-setup Demonstrates how to prepare a configuration file by copying a template from the provided examples. This file is essential for customizing the deployment settings. ```bash #list of example templates config-template-examples/ └── tokkio-3streams ├── config-template.yml └── my-config.env Copy a config template of your choice as the base config template for this installation. cp config-template-examples/tokkio-3streams/config-template.yml ./my-config.yml ``` -------------------------------- ### Set Up and Source Environment Variables Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/gcp-setup Copies an example environment variables file and modifies it with specific settings. The `source` command then loads these variables into the current shell session, making them available for subsequent commands. ```bash cp config-template-examples/tokkio-3streams/my-config.env my-env-file.env vi my-env-file.env source my-env-file.env ``` -------------------------------- ### Uninstall Tokkio Workflow with envbuild.sh Source: https://docs.nvidia.com/ace/tokkio/5.0/quickstart-guide This script uninstalls the entire Tokkio setup. It requires the shell environment variables from 'my-config.env' to be sourced. The command specifies the uninstall action for all components using Terraform. ```shell source my-config.env ./envbuild.sh uninstall --tf-binary terraform --component all --config-file ./ ``` -------------------------------- ### Set Cloud Native Stack Version Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/bare-metal-manual-setup Creates a file to specify the version of NVIDIA Cloud Native Stack (CNS) to be installed. This ensures the correct version is used during the setup process. ```bash echo "14.0" > cns_version.yaml ``` -------------------------------- ### Copy and Prepare Tokkio Environment Variables File Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/aws-lite-setup This snippet demonstrates copying an example environment variables file and preparing it for customization. The `my-env-file.env` file contains crucial settings for the deployment. ```shell cp config-template-examples/tokkio-3streams/my-config.env my-env-file.env vi my-env-file.env ``` -------------------------------- ### Copy and Prepare Tokkio Configuration File Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/aws-lite-setup This section shows how to copy a template configuration file for Tokkio and prepare it for customization. The configuration file (`my-config.yml`) is essential for tailoring the installation to specific needs. ```shell cp config-template-examples/tokkio-3streams/config-template.yml ./my-config.yml ``` -------------------------------- ### Uninstall Entire Setup Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/aws-setup Removes all components, including the Kubernetes cluster and AWS infrastructure, set up during the installation. Use this command with caution as it deletes all created resources. ```bash ./envbuild.sh uninstall --tf-binary terraform --component all --config-file ./my-config.yml ``` -------------------------------- ### Uninstall Entire Tokkio Setup Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/aws-lite-setup This command uninstalls both the Tokkio application and the associated AWS infrastructure provisioned during installation. Use with caution as it removes all created resources. ```shell source my-env-file.env ./envbuild.sh uninstall --tf-binary terraform --component all --config-file ./my-config.yml ``` -------------------------------- ### Fix 'No module named 'redis'' Error with uv sync Source: https://docs.nvidia.com/ace/tokkio/5.0/customization/customization-methods/local-developer-method This error occurs when the 'redis' or other required Python modules are not installed. Ensure all project dependencies are installed by running the 'uv sync' command as described in the Initial Setup section. ```shell python start_dev.py Traceback (most recent call last): File "/workspace/tokkioucfapp/dev_tool/local_dev/start_dev.py", line 2, in import redis.asyncio as redis ModuleNotFoundError: No module named 'redis' # or any other missing module(s) ``` -------------------------------- ### Add and Update Helm Repositories (Bash) Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/bare-metal-manual-setup Adds the 'containeroo' and 'nvidia-ace' Helm chart repositories and updates the local Helm chart repository cache. ```bash helm repo add containeroo https://containeroo.github.io/helm-charts helm repo update helm repo add nvidia-ace https://helm.ngc.nvidia.com/nvidia/ace --username '$oauthtoken' --password $NGC_CLI_API_KEY ``` -------------------------------- ### Install Tokkio Helm Chart with Additional Overrides Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/bare-metal-manual-setup Installs or upgrades the Tokkio Helm chart, incorporating both the primary override values and an additional override file. This allows for advanced customization, such as integrating custom assets for the Unreal renderer, during the deployment process. ```bash helm upgrade \ --install \ --reset-values \ --create-namespace \ --namespace app \ --username '$oauthtoken' \ --password "${NGC_CLI_API_KEY}" \ --values /tmp/ucf-tokkio-audio-video-app.yml \ --values /tmp/additional-overrides.yml \ tokkio-app \ https://helm.ngc.nvidia.com/nvidia/ace/charts/tokkio-1stream-with-ui-5.0.0-GA.tgz ``` -------------------------------- ### Install Helm Chart from NGC (YAML) Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/common-setup-procedures Configures Helm chart installation from NGC (NVIDIA GPU Cloud) by specifying the repository URL, chart name, version, and release name. It also allows for local override values files to customize the deployment. ```yaml app: configs: app_settings: helm_chart: repo: repo_url: 'https://helm.ngc.nvidia.com/myorg/myteam' chart_name: 'my-chart' chart_version: '1.0.1' release_name: 'my-tokkio-app' user_value_override_files: - "/home/myuser/custom-charts/my-app-override-values-one.yaml" - "/home/myuser/custom-charts/my-app-override-values-two.yaml" ``` -------------------------------- ### Create a Basic Custom React Page Source: https://docs.nvidia.com/ace/tokkio/5.0/microservices/ui/customization/customize-tokkio-ui This snippet demonstrates how to create a simple custom page in React. It involves creating a new JSX file in the 'pages' directory and defining a basic component that renders 'Hello World!'. This serves as a starting point for a customized user interface. ```jsx import React from 'react'; function MyCustomPage() { return (

Hello World!

); } export default MyCustomPage; ``` -------------------------------- ### Download Tokkio UI Source Code Source: https://docs.nvidia.com/ace/tokkio/5.0/microservices/ui/deployment This command downloads the UI source code from the public NGC offering. Ensure you have the NGC CLI installed and configured. ```bash ngc registry resource download-version "nvidia/ace/tokkio-ui-source-code:6.6.16" ``` -------------------------------- ### Verify Installation: Check Pod Status Source: https://docs.nvidia.com/ace/tokkio/5.0/deployment/gcp-setup Commands to verify the installation by checking the status of pods within the application namespace. This step ensures all components are running correctly. ```bash kubectl get pods \-n ``` -------------------------------- ### Edit Sudoers File Safely (Bash) Source: https://docs.nvidia.com/ace/tokkio/5.0/quickstart-guide Opens the sudoers file using the `visudo` command, which provides syntax checking to prevent configuration errors. This command should be run with sudo privileges. ```bash sudo visudo ```