Skip to content

Commit d76fc34

Browse files
First commit
1 parent 5921d47 commit d76fc34

File tree

3 files changed

+171
-0
lines changed

3 files changed

+171
-0
lines changed
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Building NVIDIA blueprint on OCI: Digital twins for fluid simulation
2+
3+
This tutorial explains how to run the NVIDIA Omniverse Digital Twins for Fluid Simulation blueprint on OCI. This example shows how to study the aerodynamics (drag, down force, etc.) of a car using a virtual wind tunnel.
4+
5+
6+
## Prerequisites
7+
8+
To run this blueprint, you will need:
9+
- an OCI tenancy with limits to use a BM.GPU.L40S-NC.4 shape
10+
- an NVIDIA account for the NGC Catalog
11+
- an NGC API key to download images from the NGC catalog
12+
13+
14+
## Instance configuration
15+
16+
In the OCI Console, create an instance using the BM.GPU.L40S-NC.4 shape (bare metal server with 4 x NVIDIA L40S GPU) and a native Canonical Ubuntu 22.04 image. NVIDIA drivers will be installed afterwards.
17+
18+
19+
### Installing NVIDIA drivers
20+
21+
When the instance is up, a specific version NVIDIA drivers can be installed. but beforehands, we must install additional packages toi build them:
22+
```
23+
sudo apt install -y build-essential
24+
```
25+
Then we can download the NVIDIA driver version 535.161.07 available [here](https://www.nvidia.com/fr-fr/drivers/details/220428/) and install it.
26+
```
27+
wget https://fr.download.nvidia.com/XFree86/Linux-x86_64/535.161.07/NVIDIA-Linux-x86_64-535.161.07.run
28+
chmod +x NVIDIA-Linux-x86_64-535.161.07.run
29+
sudo ./NVIDIA-Linux-x86_64-535.161.07.run
30+
```
31+
The instance must be rebooted for the changes to be taken into account.
32+
```
33+
sudo reboot
34+
```
35+
36+
37+
### Installing additional packages
38+
39+
As this is a native Ubuntu version, a few additional packages must be installed to clone the repo and add and configure docker.
40+
```
41+
sudo apt install -y git-lfs
42+
sudo apt install -y docker.io
43+
sudo apt install -y docker-compose-v2
44+
sudo apt install -y docker-buildx
45+
```
46+
47+
### Installing and configuring NVIDIA Container Toolkit
48+
49+
First of all, we must add the NVIDIA Container Toolkit repository to the repository list:
50+
```
51+
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
52+
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
53+
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
54+
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
55+
```
56+
Then, we can update the list of packages from all repositories, install the `nvidia-container-toolkit` package and configure docker.
57+
```
58+
sudo apt update
59+
sudo apt install -y nvidia-container-toolkit
60+
sudo nvidia-ctk runtime configure --runtime=docker
61+
sudo systemctl restart docker
62+
```
63+
64+
## Downloading and building the project
65+
66+
At this stage it is necessary to set you NGC API key as an environment variable to be able to download the right content from the NGC Catalog.
67+
```
68+
echo "export NGC_API_KEY=nvapi-xxx" >> ~/.bashrc
69+
source ~/.bashrc
70+
```
71+
where `nvapi-xxx` is your own NGC API key.
72+
73+
Once done, we can clone the repository and build the images:
74+
```
75+
git clone ssh://github.com/NVIDIA-Omniverse-Blueprints/digital-twins-for-fluid-simulation $HOME/digital_twins_for_fluid_simulation
76+
cd $HOME/digital_twins_for_fluid_simulation
77+
./build-docker.sh
78+
```
79+
Now 2 files have to be modified, namely `.env` and `compose.yml`.
80+
81+
First, create a copy of the environment file template:
82+
```
83+
cp .env_template .env
84+
```
85+
and set the `ZMQ_IP` with the instance private IP address.
86+
```
87+
ZMQ_IP=XXX.XXX.XXX.XXX
88+
```
89+
90+
Then, modify `compose.yml` file.
91+
1. In the `kit` section, replace the `network_mode: host` line by the following block:
92+
```
93+
networks:
94+
outside:
95+
ipv4_address: XXX.XXX.XXX.XXX
96+
```
97+
and set the `ipv4_address` variable with the instance public IP address.
98+
99+
2. In the `aeronim` section, comment the `network_mode: host` line.
100+
101+
3. At the bottom of the file, add the following block:
102+
```
103+
networks:
104+
outside:
105+
driver: bridge
106+
ipam:
107+
driver: default
108+
config:
109+
- subnet: XXX.XXX.XXX.0/24
110+
```
111+
where the subnet mask is your public IP address with the last number replaced by 0.
112+
113+
## Running the blueprint
114+
115+
To start the digital twin, simply run the following command:
116+
```
117+
sudo docker compose up -d
118+
```
119+
The blueprint will take some time to initialize. Expect a minimum of 10 minutes before accessing the GUI in a web browser at `http://XXX.XXX.XXX.XXX:5273` where `XXX.XXX.XXX.XXX` is the public IP address of the instance. You should something like the image below.
120+
121+
![NVIDIA Omniverse Digital Twin for Fluid Simulation Blueprint](assets/images/omniverse-blueprint-digital-twin-gui.png "NVIDIA Omniverse Digital Twin for Fluid Simulation Blueprint")
122+
123+
Run `sudo docker compose down` to stop the project.
124+
125+
126+
## External links
127+
128+
* [Original NVIDIA GitHub repo](https://github.com/NVIDIA-Omniverse-blueprints/digital-twins-for-fluid-simulation)
129+
130+
## License
131+
132+
Copyright (c) 2025 Oracle and/or its affiliates.
133+
134+
Licensed under the Universal Permissive License (UPL), Version 1.0.
135+
136+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2024 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.
Loading

0 commit comments

Comments
 (0)