0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AWSでIsaac Simの動作・開発環境を構築する(Ubuntu編)

Last updated at Posted at 2025-04-30

1. はじめに

前回(AWSでIsaac Simの動作・開発環境を構築する(Windows編))に引き続き、AWS上でISaac Simの動作・開発環境を構築します。今回は、Ubuntu 22.04 LTSでISaac Simの動作・開発環境を構築します。前回と同様に今回も手動でNVIDIAのドライバをインストールして環境構築してみたいと思います。

2. GPUインスタンス(g5.2xlarge)を起動する

まず、SSHとRDPでUbuntuにログインできるようにするため、インターネットからのSSHとRDPを許可するセキュリティグループを作成します。

image.png

EC2インスタンスを起動します。設定は以下としました。

リージョン: 東京リージョン
OS:Ubuntu 22.04 LTS
インスタンスタイプ:g5.2xlarge
ストレージ:80GB
セキュリティグループ: 事前に作成したSSHとRDPを許可するセキュリティグループ

3. XRDPでGUIにログインできるようにする

EC2インスタンスが起動したら、SSHでUbuntuにログインします。

次にubuntu-desktopとxrdpをインストールし、xrdpを有効化します。

sudo apt update
sudo apt -y upgrade
sudo apt install -y ubuntu-desktop  xrdp
sudo systemctl enable xrdp

次にRDP用のユーザーを作成します。

sudo adduser omnirdp
sudo passwd omnirdp
sudo usermod -aG sudo omnirdp

ここまで来たらいったんrebootします。

reboot

4. XRDPでGUIにログインする

Windowsのリモートデスクトップ接続で、Ubuntuにアクセスします。すると次のような画面が表示されるため、RDP用に作成したユーザーアカウントを入力します。

image.png

無事にRDP接続できました。

image.png

5. NVIDIAのGPUドライバをインストールする

Amazon EC2 インスタンス用の NVIDIA ドライバーに従って、NVIDIAのドライバをインストールします。
前回のWindowsと同様にGRIDドライバーをインストールします。

sudo apt-get update -y
sudo apt-get install -y gcc make
sudo apt-get upgrade -y linux-aws
sudo reboot
sudo apt-get install -y linux-headers-$(uname -r)

NVIDIA グラフィックスカード用の nouveau オープンソースドライバーを無効にします。

cat << EOF | sudo tee --append /etc/modprobe.d/blacklist.conf
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
EOF

/etc/default/grub ファイルを編集します。

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
#GRUB_CMDLINE_LINUX=""                      # コメントアウト
GRUB_CMDLINE_LINUX="rdblacklist=nouveau"    # 追加
・・・

Grub 設定を再構築します。

sudo update-grub

S3からGPUドライバのインストーラーを取得するために、AWS CLIを取得します。

sudo apt install awscli

EC2インスタンスに、S3の参照が可能なロールを割り当てます。この手順は前回の記事を参照してください。

次に最新版のGPUドライバを取得し、実行権限を付与します。

aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ .
chmod +x NVIDIA-Linux-x86_64*.run

ドライバのインストール実行を実行します。

sudo /bin/sh ./NVIDIA-Linux-x86_64*.run

インストールの途中で、次のエラーがログに出力され失敗しました。
カーネルはgcc-12でビルドされているが、現在はgcc-11が使用されているということでエラーになったようです。

/var/log/nvidia-installer.log
Makefile:63: WARNING: Unable to locate the compiler x86_64-linux-gnu-gcc-12 from CONFIG_CC_VERSION_TEXT in the kernel configuration.
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-1027-aws'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Deep Seekに対策を聞いてみると、以下を提案されたので、そのまま実行してみたところ成功しました。なお、ドライバのインストーラー中の選択肢はすべてデフォルトを選択しました。

sudo apt update
sudo apt install gcc-12 g++-12 build-essential
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
export IGNORE_CC_MISMATCH=1
sudo /bin/sh ./NVIDIA-Linux-x86_64*.run

無事にドライバーがインストールできました。
image.png

なお、今回は最新のドライバーをインストールしましたが、S3には複数のバージョンのドライバが保存されているため、問題が起きた場合は、他のバージョンのドライバをインストールすることができます。利用可能なドライバは以下のコマンドで確認することができます。

aws s3 ls --recursive s3://ec2-linux-nvidia-drivers/

6. Isaac Simを起動する

isaacsim-app-templateをクローンして、ビルドして起動します。

git clone https://github.com/isaac-sim/isaacsim-app-template.git
cd isaacsim-app-template
./repo.sh build
./_build/linux-x86_64/release/isaacsim.exp.full.kit.sh

無事に起動できました。

image.png

image.png

7. ISaac Simをブラウザでストリーミング表示する

web-viewer-sampleを使用して、ブラウザでストリーミング表示できるか確認します。

まず、web-viewer-sampleためのNode.jsをインストールします。次のコマンドを実行して、Node.js v18をインストールします。

sudo apt update
sudo apt install curl git build-essential libssl-dev

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.bashrc

nvm install v18.20.8
nvm use v18.20.8

次にweb-viewer-sampleをダウンロードして起動します。

git clone https://github.com/NVIDIA-Omniverse/web-viewer-sample.git
cd web-viewer-sample
npm install
npm run dev

web-viewer-sampleの起動に成功すると、次の画面が表示されます。
image.png

上記のコンソール中に出力されているURLにブラウザでアクセスし、「UI for any streaming app」を選択してNextボタンを押します。
image.png

無事にブラウザでISaac Simの画面が表示できました。

image.png

8. まとめ

AWS g5.2xlargeインスタンス(Ubuntu 22.04)でIsaac Simの基本動作を確認できました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?