The contents in this repository is for demonstrating Riva SDK workflow. Please execute the notebook files described below in sequence to avoid some dependencies.
It shows how to use basic riva api with simple examples.
It shows how to finetune the existing pre-trained model to your target task using NeMo toolkit based on TTS example(fastptich-HifiGan).
It contains how to convert NeMo to Riva format, how to build Riva to get RMIR, and finally, how to deploy it to the Riva Service.
Some additional information about NeMo is included.
Docker command used to launch NeMo Container:
docker run --gpus device=3 -it --rm -p 1005:8888 -p 8009:8009 --network riva-speech -v <my workspace where this repo ls cloned>:/wsoh/workspace nvcr.io/nvidia/nemo.1.5.1
-
Get access to NGC and install NGC CLI tools.
-
Download Riva resources from NGC
mkdir –p ./resources && cd resources
ngc registry resource download-version "nvidia/riva/riva_quickstart:1.9.0-beta"
- Create docker network
docker network create riva-speech
- Initialize and start Riva Server
- Modify
config.sh
with your preffered configuration from downloaded resources. Then, run:
- Modify
riva_init.sh
- Add `--network riva-speech` option to docker running command in `riva_start.sh`(around line number 78) from downloaded resources. Then, run:
riva_start.sh
- Start Riva Client(Optional)
- You can start Riva client from downloaded resources by executing:
riva_start_client.sh
- However, we'll not use `riva_start_client.sh` in this demo. We will manually install riva-client in our NeMo container environment.
- Binary wheel for Riva client api
- Binary wheel for format converter from NeMo to Riva
- Automatically initialize and setup runnable riva environment.
- Pull riva container images(server, client, servicemaker)
- Download default built models(RMIRs) enabled in
config.sh
from NGC- Download location:
$riva_model_loc/rmir
, which is defined as docker volume
- Download location:
- Optimize the downloaded models and deploy them to model repository
- Deploy location:
$riva_model_loc/models
- Deploy location:
- Start riva server port # 8000, 8001, 8002 for triton, port 50051(default) for riva-speech api.
- Preload model repos based on desired services
- Start riva client
- Shut down riva server container.
- Clean up local riva installation.
- You might need to remove docker volume manually, after this shell script is done