|
| 1 | +# Digital Twin Example using NVIDIA Omniverse |
| 2 | + |
| 3 | +This solution demonstrates how to run a digital twin of an automobile in a wind |
| 4 | +tunnel to evaluate the aerodynamic effect of modifications to the features of |
| 5 | +the car. |
| 6 | +The digital twin runs on the NVIDIA Omniverse software platform and uses GPU |
| 7 | +nodes on Oracle Cloud Infrastructure (OCI) to visualize the airflow over the |
| 8 | +car as well as AI inference to quickly assess how changes to the car will |
| 9 | +affect the airflow. |
| 10 | + |
| 11 | +Reviewed: 02.07.2025 |
| 12 | + |
| 13 | +# When to use this asset? |
| 14 | + |
| 15 | +This asset is ideal for developers, educators, or any professional looking for: |
| 16 | + |
| 17 | +- Demonstrate Oracle Cloud capabilities: This is a great demo asset to showcase |
| 18 | + the abilities of OCI to run applications utilizing the NVIDIA Omniverse framework |
| 19 | + |
| 20 | +# How to use this asset? |
| 21 | + |
| 22 | +## Prerequisites |
| 23 | + |
| 24 | +To run this tutorial, you will need: |
| 25 | + |
| 26 | +* An OCI tenancy with limits set for GPU based instances, with a minimum of 2 GPUs available, either: |
| 27 | + * NVIDIA A10 for a minimum demonstration |
| 28 | + * NVIDIA L40S for optimal visualization performance |
| 29 | +* An access key to NVIDIA's NGC Catalog |
| 30 | + |
| 31 | +The software setup is describe in depth [in the NVIDIA Omniverse Blueprint](https://github.com/NVIDIA-Omniverse-blueprints/digital-twins-for-fluid-simulation). |
| 32 | + |
| 33 | +## Deploying the supporting GPU shape |
| 34 | + |
| 35 | +1. Navigate to the "Instances" in the Cloud Console, and create a new instance: |
| 36 | + - Select "Canonical Ubuntu 24.04" as the image, and at the minimum "VM.GPU.A10.2" as the shape |
| 37 | + - Select a public subnet to place the machine in |
| 38 | + - Note the VCN and subnet used |
| 39 | + - Upload or paste your public SSH key |
| 40 | + - Increase the boot volume size to 150 Gb |
| 41 | + |
| 42 | +2. After the instance has been created, navigate to the VCN that the instance uses, and create a new security list under the tab "Security". Use the following settings: |
| 43 | + <center><img src="files/subnet.png" alt="Security list settings opening ports for Omniverse kit and web applications" style="max-width:90%; height:auto;" /></center> |
| 44 | + |
| 45 | +## Deploying the Digital Twin |
| 46 | + |
| 47 | +1. SSH into the deployed shape and first enable the NVIDIA container toolkit repository: |
| 48 | + ```console |
| 49 | + curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ |
| 50 | + && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ |
| 51 | + sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ |
| 52 | + sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list |
| 53 | + ``` |
| 54 | + |
| 55 | +2. Update the package cache and install the required software: |
| 56 | + ```console |
| 57 | + sudo apt update |
| 58 | + sudo apt install -y build-essential git-lfs docker-compose-v2 |
| 59 | + sudo apt install -y nvidia-driver-570-server nvidia-container-toolkit |
| 60 | + ``` |
| 61 | + |
| 62 | +3. Configure the container runtime, add the current user to the Docker group and reboot: |
| 63 | + ```console |
| 64 | + sudo nvidia-ctk runtime configure --runtime=docker |
| 65 | + sudo usermod -aG docker ubuntu |
| 66 | + sudo reboot |
| 67 | + ``` |
| 68 | + |
| 69 | +4. Open the ZeroMQ ports required for the web app to communicate with the |
| 70 | + inferencing backend: |
| 71 | + ```console |
| 72 | + sudo iptables -I INPUT -p tcp -m multiport --dports 5555:5560 -j ACCEPT |
| 73 | + sudo iptables -I INPUT -p tcp -m multiport --sports 5555:5560 -j ACCEPT |
| 74 | + ``` |
| 75 | + |
| 76 | +5. Log into the NVIDIA container registry using `$oauthtoken` as user and your |
| 77 | + NGC token as password. Then clone the digital twin example and build it: |
| 78 | + ```console |
| 79 | + docker login nvcr.io |
| 80 | + git clone https://github.com/NVIDIA-Omniverse-blueprints/digital-twins-for-fluid-simulation.git |
| 81 | + cd digital-twins-for-fluid-simulation |
| 82 | + ./build-docker.sh |
| 83 | + ``` |
| 84 | + |
| 85 | +6. Copy the [configuration script `setup.sh`](./files/setup.sh) to the node and |
| 86 | + run it, then start the digital twin: |
| 87 | + ```console |
| 88 | + bash ./setup.sh |
| 89 | + docker compose up |
| 90 | + ``` |
| 91 | + |
| 92 | +7. You should now be able to navigate to your node's public IP, on port 5273 in |
| 93 | + a browser and evaluate the digital twin: |
| 94 | + <center><img src="files/twin_running.png" alt="A digital twin of a car in a wind tunnel, running in NVIDIA Omniverse" style="max-width:90%; height:auto;" /></center> |
| 95 | + |
| 96 | + |
| 97 | +# Acknowledgments |
| 98 | + |
| 99 | +- **Author** - Matthias Wolf (Generative AI Ecosystem Black Belt) |
| 100 | + |
| 101 | +# External links |
| 102 | + |
| 103 | +* [NVIDIA Omniverse Blueprint for Digital Twins for Fluid Simulation](https://github.com/NVIDIA-Omniverse-blueprints/digital-twins-for-fluid-simulation) |
| 104 | + |
| 105 | +# License |
| 106 | + |
| 107 | +Copyright (c) 2025 Oracle and/or its affiliates. |
| 108 | + |
| 109 | +Licensed under the Universal Permissive License (UPL), Version 1.0. |
| 110 | + |
| 111 | +See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details. |
0 commit comments