๊ฐ์
์ฐ์ฐ์ฐฎ๊ฒ ๋์๋ฆฌ ๋ด์์ ํ์ ๊ด์ฌ์๋ ๋ฉ์ค ๊ต์๋๊ป์ ์ธํด์ ๋ชจ์งํ๋ค๋ ๊ณต๊ณ ๋ฅผ ๋ณด์๋ค. ์ด์ ๋๋ ์ง์ํ์๊ณ 'Isaac Sim ์ ํ์ฉํ ๋ชจ๋ฐ์ผ ์์จ ์ฃผํ ๋ก๋ด' ์ ๊ฐ๋จํ๊ฒ ๋ง๋ค์ด๋ณด๊ณ ๋ค์ ์ฐ๋ฝ์ ์ฃผ๋ฉด ์ข๊ฒ ๋ค๋ ๋ต์ ์ ๋ฐ์๋ค.
๊ทธ๋ฌ๋ Isaac Sim ์ ๊ต์ฅํ ๋์ ์ฌ์์ GPU, RAM ์ ํ์๋ก ํ๊ณ ๊ทธ๋ฌํ ์ปดํจํฐ๋ฅผ ์ ๊ณตํ๋ ์ค์ต ๊ณต๊ฐ์ ์ฐพ๊ธฐ๊ฐ ํ๋ค์๋ค.
์ด์ ๊ณต์ ๋ฌธ์๋ฅผ ์ดํผ์ด Cloud ์์ Isaac sim ์ ๋ฐฐํฌํ๊ณ (ํด๋ผ์ฐ๋์์ ์ฐ์ฐ ์ฒ๋ฆฌ) ์จ๋ผ์ธ์ผ๋ก ํ๋ฉด์ streaming ํด์ฃผ๋ ๊ธฐ์ ์ด ์๋ค๋ ๊ฒ์ ์์๋ค.
์ฒ์์๋ IssacLab Automator ๊ฐ ์ ๊ณตํด์ฃผ๋ ์๋น์ค ๋ฒ์์ ๋ํด ํผ๋์ด ์์๋๋ฐ, ์์ ํด๋ผ์ฐ๋ ์ธ์คํด์ค๋ฅผ ํ๋ ๋น๋ ค์ ์๊ฒฉ ํด๋ผ์ด์ธํธ์์ Isaac Sim ์ ์กฐ์ํ ์ ์๋ ์ธํฐํ์ด์ค๋ฅผ ์ ๊ณตํด์ฃผ๋ ๊ฒ์ด๋ผ๊ณ ์ดํดํ๋ฉด ๋ ๊ฒ๊ฐ๋ค.
์กฐ๊ธ ๋ฐ์์ฑ์ ๋จ์ด์ง์ง๋ง ๋ด ์ํฉ์์๋ ์ต์ ์ด์๊ธฐ์ ์ด๋ฅผ ํ์ฉํ์ฌ ๊ฐ์ ์ ์ผ๋ก ๊ฐ๋ฐํ๋ ๋ฐฉ์์ ํํ๊ธฐ๋ก ํ์๋ค.
Issac automator๋?
Issac Automator to create an aws instance with Isaac Lab
Isaac Lab๋ Isaac Automator๋ฅผ ์ฌ์ฉํ์ฌ ๋ค์ํ ํด๋ผ์ฐ๋ ์ธํ๋ผ์์ ์คํํ ์ ์๋ค. Isaac Automator๋ Isaac Sim๊ณผ Isaac Lab์ ๊ณต๊ณต ํด๋ผ์ฐ๋(AWS, GCP, Azure, Alibaba Cloud)์ ์ ์ํ๊ฒ ๋ฐฐํฌํ ์ ์๊ฒ ํด์ฃผ๋ ๋๊ตฌ์ด๋ค.
๊ทธ ๊ฒฐ๊ณผ๋ Fully configured remote desktop cloud workstation(์์ ํ ๊ตฌ์ฑ๋ ์๊ฒฉ ๋ฐ์คํฌํ ํด๋ผ์ฐ๋ ์์ ๊ณต๊ฐ)์ผ๋ก, ๋ช ๋ถ ์์ Isaac Lab์ ๊ฐ๋ฐํ๊ณ ํ ์คํธํ ์ ์๊ฒ ํด์ฃผ๋ฉฐ, ์์ฐ์ ๋ง๋ ๋น์ฉ์ผ๋ก ์ฌ์ฉํ ์ ์๋ค. Isaac Automator๋ ๋ค์ํ GPU ์ธ์คํด์ค์ ํด๋ผ์ฐ๋ ๋น์ฉ ์ ๊ฐ์ ์ํ ์ ์ง-์์ ๊ธฐ๋ฅ์ ์ง์ํ๋ฉฐ, ๋ฐ์ดํฐ ์ ๋ก๋ ๋ฐ ๋ค์ด๋ก๋, ์๋ ์คํ, ๋ฐฐํฌ ๊ด๋ฆฌ ๋ฑ๊ณผ ๊ฐ์ ๋ค์ํ ์ํฌํ๋ก์ฐ ๋๊ตฌ๋ฅผ ์ ๊ณตํ๋ค.
Isaac Automator ์ค์น
Isaac Automator๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด ๋จผ์ ๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ ํด๋ก ํด์ผ ํ๋ค.
git clone https://github.com/isaac-sim/IsaacAutomator.git
Isaac Automator๋ ์์คํ ์ Docker๊ฐ ๋ฏธ๋ฆฌ ์ค์น๋์ด ์์ด์ผ ํ๋ค. Docker ์ค์น ๋ฐฉ๋ฒ์ ์ด์ ์ฒด์ ์ ๋ง๋ Docker ์น์ฌ์ดํธ์ ์ง์นจ์ ๋ฐ๋ผ์ผํ๊ณ ๋ํ Docker๋ฅผ sudo ์์ด ์คํํ ์ ์๋๋ก ํ๋ ํ์ ์ค์น ๋จ๊ณ๋ฅผ ๋ฐ๋ผ์ผ ํ๋ค.
Isaac Automator๋ฅผ ํ์ฉํ๊ธฐ ์ํด์๋ NGC API ํค๋ฅผ ํ๋ํด์ผ ํ๋ค. NVIDIA Developer Program์ ๊ฐ์ ํ์ฌ Isaac Sim ์ปจํ ์ด๋์ ์ ๊ทผํ๊ณ , NVIDIA GPU Cloud(NGC)์์ ์ ๊ธ๋ ์ปจํ ์ด๋ ์ด๋ฏธ์ง๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํ NGC API ํค๋ฅผ ์์ฑํ๋ค.
๋ค์์ API ํค๋ฅผ ์์ฑํ ํ, ํฐ๋ฏธ๋์์ NGC์ ๋ก๊ทธ์ธํด์ผ ํ๋ค. ์๋๋ NVIDIA GPU Cloud (NGC)์ Docker ๋ ์ง์คํธ๋ฆฌ์ ๋ก๊ทธ์ธํ๋ ๋ช ๋ น์ด์ด๋ค.
docker login nvcr.io
๋ก๊ทธ์ธ ์ ์ฌ์ฉ์ ์ด๋ฆ์ $oauthtoken์ผ๋ก ์ ๋ ฅํ๊ณ , ๋น๋ฐ๋ฒํธ๋ ์์ฑํ NGC API ํค๋ฅผ ์ ๋ ฅํ๋ค.
Issac Sim ๋ฐฐํฌ๋ฅผ ์ํ AWS ํ๊ฒฝ ๊ตฌ์ถ
๊ฐ์ฅ ๋จผ์ Getting AWS IAM USER Access Credentials ์ ์ํด
- IAM USER ํญ์์ Access ํค, Secret ํค๋ฅผ ํ์ธํ๋ค.
- ํด๋น IAM User ์ ๋ํด Enabling Access Permissions. *AmazonEC2FullAccess ๋ฅผ ๋ถ์ฌํ๋ค.*
์ด๋ ๋๋ฅผ ๋์ ํ์ฌ Isaac Sim ์ ec2 ์ธ์คํด์ค์ ๋ฐฐํฌํด์ค ๊ถํ์ ์ค์ ํ๊ธฐ ์ํจ์ด๋ค.
Isaac Automator ์คํ
Isaac Automator๋ฅผ ์คํํ๋ ค๋ฉด ๋จผ์ Isaac Automator ์ปจํ ์ด๋๋ฅผ ๋น๋ํด์ผ ํ๋ค.
Linux/MacOS
./build
์ ๋ช ๋ น์ด๋ฅผ ์คํํ๋ฉด ํ ๋ผํผ(terafrom) ์ ๋ช ์๋ ๋ฐฐํฌ ์คํฌ๋ฆฝํธ๊ฐ ์๋์ผ๋ก ์คํ๋๋ค.
๋ง์ฝ configuration ๊ด๋ จํ์ฌ ์์ ํ๊ณ ์ถ์ ์ฌํญ์ด ์๋ค๋ฉด .tf ํ์ผ์ ํ์ธํด๋ณธ๋ค.
๊ทธ ๋ค์, ์ปจํ ์ด๋์ ๋ค์ด๊ฐ๋ ค๋ฉด
# enter the automator container
./run
# inside container:
./somecommand
๊ทธ ๋ค์์๋ ์ ํธํ๋ ํด๋ผ์ฐ๋ ํ๋ซํผ์ ๋ง๋ ๋ฐฐํฌ ์คํฌ๋ฆฝํธ๋ฅผ ์คํํ๋ค.
๋ ๊ฐ์ ๊ฒฝ์ฐ์๋ AWS ๋ก ๋ฐฐํฌํ๋ฏ๋ก ๋ค์ ๋ช
๋ น์ด๋ฅผ ์ฌ์ฉํ๋ค.
./deploy-aws
๊ทธ๋ฌ๋ฉด ๋ค์๊ณผ ๊ฐ์ด ๋ฐฐํฌ์ ๊ด๋ จํ ์ฌ๋ฌ ์ง๋ฌธ ๋ชฉ๋ก(ํ๊ฒฝ ์ค์ ๋ฐ ์๊ฒฉ ์ฆ๋ช
์
๋ ฅ์ ๋ํ ์๋ด)์ด ํฐ๋ฏธ๋์ ํ์๋๋ค.[]
์์ ์๋ ๊ฒ์ ์์ฃผ๋ก ๋ต๋ณํ๋ฉด ๋๋ค.
[๊ฒฐ๊ณผ]
[Isaac Automator v3.4.1]:/app$ ./deploy-aws
* Deployment Name (lower case letters, numbers and "-") [crunchy-grid]: isaac-sim
* AWS Region [US East 1]: us-east-1
* Deploy Isaac Sim? [Y/n]: Y
* Isaac Sim Instance Type (https://docs.aws.amazon.com/dlami/latest/devguide/gpu.html, G5, G4dn and G6 instances are supported) [g5.2xlarge]: g5.2xlarge
* Isaac Sim docker image [nvcr.io/nvidia/isaac-sim:4.2.0]: nvcr.io/nvidia/isaac-sim:4.2.0
* [DEPRECATED] Install Omni Isaac Gym Envs? Valid values: 'no', or <git ref in github.com/NVIDIA-Omniverse/OmniIsaacGymEnvs> [no]: no
* Install Isaac Sim Lab? Valid values: 'no', or <git ref in github.com/isaac-sim/IsaacLab> [v1.3.0]: v1.3.0
* NGC API Key (can be obtained at https://ngc.nvidia.com/setup/api-key) []: ~
* AWS Access Key ID []: ~
* AWS Secret Access Key []: ~
* Deploymemnt exists, what would you like to do? See --help for details. (repair, modify, replace, run_ansible) [replace]: replace
* Deleting existing deployment...
* Initializing terraform modules...
* Destroying AWS resources used by "isaac-sim"...
โ ๏ธ ํธ๋ฌ๋ธ ์ํ โผ๏ธ
๊ทธ๋ฌ๋ ๋๋ ์ฒ์์ vCPU ์ ํ์ด ๊ฑธ๋ ค ์๋ค๋ Error๊ฐ ๋ ์ AWS ์ธก์ ์กฐ์ ์ ์์ฒญํ๊ณ ํ๊ฐ ๋ต์ฅ์ ๋ฐ์๋ค.
๊ทธ๋ฌ๋, vCPU ์ ํ์ ํผ ์ดํ์๋ us-east-1 ์์ญ์๋ ์ฌ์ฉ๊ฐ๋ฅํ ์ธ์คํด์ค๊ฐ ์กด์ฌํ์ง ์์์
๊ฒฐ๊ตญ us-east ๋ก region์ ๋ฐ๊พธ์ด vCPU ์ ํ์ ํ๋ฒ ๋ ํ๊ณ ์๋ํ๋ค.
๋ฐฐํฌ ์ฑ๊ณต
us-east๋ก ์๋ํ ๊ฒฐ๊ณผ ๋๋์ด ์ฑ๊ณตํ์๊ณ , ๋ฐฐํฌ๋ฅผ ์ฑ๊ณตํ๋ฉด ํด๋น ์ธ์คํด์ค์ ์ ๊ทผํ ์ ์๋ ๋ค์ํ ๋ฐฉ๋ฒ๋ค์ด ์๋ด๋๋ค.
* Uploaded 12K to "/home/ubuntu/uploads" @ Isaac Sim instance (34.197.113.153)
*******************************************
* Isaac Sim is deployed at 34.197.113.153 *
*******************************************
* To connect to Isaac Sim via SSH:
ssh -i state/isaac-sim/key.pem -o StrictHostKeyChecking=no ubuntu@34.197.113.153
* To connect to Isaac Sim via noVNC:
1. Open http://34.197.113.153:6080/vnc.html?host=34.197.113.153&port=6080 in your browser.
2. Click "Connect" and use password "QBi0eWilR4"
* To connect to Isaac Sim via NoMachine:
0. Download NoMachine client at https://downloads.nomachine.com/, install and launch it.
1. Click "Add" button.
2. Enter Host: "34.197.113.153".
3. In "Configuration" > "Use key-based authentication with a key you provide",
select file "state/isaac-sim/key.pem".
4. Click "Connect" button.
5. Enter "ubuntu" as a username when prompted.
๋ฐฐํฌ๊ฐ ์ฑ๊ณตํ๋ฉด, ํด๋ผ์ฐ๋ ์ธ์คํด์ค์ ์ฐ๊ฒฐํ๋ ๋ฐฉ๋ฒ์ ๋ํ ์ง์นจ์ด ์ ๊ณต๋๋ค. SSH, noVCN ๋๋ NoMachine์ ํตํด ์ฐ๊ฒฐํ ์ ์๋ค.
๋๋ ์์ ์ ์๋ ๋ฐฉ๋ฒ ์ค ํ๋์ธ noMachine ์ ์ด์ฉํ๋ฉด์ฌ ํด๋ผ์ฐ๋ ์ธ์คํด์ค์์ ์คํ์ค์ธ Isaac sim ์ ์๊ฒฉ์ผ๋ก ์ ๊ทผํ์๋ค.
ํด๋ผ์ฐ๋ ์ธ์คํด์ค์ ์ฐ๊ฒฐํ๋ฉด ๋ฐ์คํฌํ์ isaaclab.sh ์์ด์ฝ์ด ํ์๋๋ค. ์ด ์์ด์ฝ์ ํด๋ฆญํ์ฌ ์คํํ๋ฉด ์๋ก์ด ํฐ๋ฏธ๋์ด ์ด๋ฆฌ๊ณ , ๊ทธ ์์์ ๋ก์ปฌ์์ ์คํํ๋ ๊ฒ์ฒ๋ผ Isaac Lab ๋ช ๋ น์ด๋ฅผ ์คํํ ์ ์๋ค.
./isaaclab.sh -p source/standalone/workflows/rl_games/train.py --task=Isaac-Cartpole-v0
๋น์ฉ์ ์ ๊ฐํ๋ ค๋ฉด ์ฌ์ฉํ์ง ์๋ ๋ฐฐํฌ๋ฅผ ์ญ์ ํ ์ ์๋ค. ์ด๋ Automator ์ปจํ ์ด๋ ๋ด์์ ํ ์ ์์ผ๋ฉฐ, ์ปจํ ์ด๋์ ๋ค์ด๊ฐ๋ ค๋ฉด ./run ๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํ๋ค.
./destroy <๋ฐฐํฌ ์ด๋ฆ>
'๋ก๋ณดํฑ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Isaac Sim์์ Nav2๋ก ์์จ์ฃผํ ํ ์คํธ (0) | 2025.01.08 |
---|---|
Installing ROS2 humble [Ubuntu 22.04] (0) | 2025.01.08 |