Advanced setup for AVA Platform#
Overview#
This instruction explains how to install advanced software for AVA platform.
- Desktop environment(XFCE)
- NVIDIA driver
- NVIDIA Container Toolkit
Checkout the repository for AVA platform#
-
git clone git@github.com:m5p3nc3r/meta-ewaol-machine.git -b kirkstone-dev
-
Copy
meta-ewaol-ext
directory to the project root.cp -rf meta-ewaol-machine/meta-ewaol-ext ~/meta-adlink-ampere
-
Download a missing patch in
meta-ewaol-ext
layer.wget -P ~/meta-adlink-ampere/meta-ewaol-ext/recipes-ewaol/recipes-container/nvidia-container-toolkit/files https://raw.githubusercontent.com/autowarefoundation/open-ad-kit-docs/main/docs/version-2.0/start-guide/installation/patch/0002-TEMPORARY-force-aarch64-rpm.patch
-
Modify
ava.yml
.header: version: 1 includes: - repo: meta-ewaol - file: meta-ewaol-config/kas/baremetal.yml + file: meta-ewaol-config/kas/baremetal-sdk.yml repos: meta-ewaol: path: meta-ewaol meta-adlink-ampere: + meta-openembedded: + path: layers/meta-openembedded + layers: + meta-oe: + meta-gnome: + meta-multimedia: + meta-xfce: + + meta-ewaol-ext: + path: meta-ewaol-ext machine: ava bblayers_conf_header: base: | POKY_BBLAYERS_CONF_VERSION = "2" BBPATH = "${TOPDIR}" BBFILES ?= "" +local_conf_header: + meta-at: | + XSERVER:append = " xserver-xorg-extension-glx xserver-xorg-module-libwfb xserver-xorg-module-exa" + IMAGE_INSTALL:append = " packagegroup-core-x11 packagegroup-xfce-extended acpid xf86-video-modesetting mesa-demos nvidia-container-toolkit" + DISTRO_FEATURES:append = " opengl x11 glx" + PACKAGECONFIG:append:pn-xserver-xorg = " xinerama" + IMAGE_FEATURES:append =" x11 x11-base" + INSANE_SKIP:${PN}:append = " already-stripped" + FILES:${PN}:append =" /usr/share/containers/oci/hooks.d/oci-nvidia-hook.json" target: - - ewaol-baremetal-image + - ewaol-baremetal-sdk-image
-
Build via kas.
kas build ava.yml
Flash yocto image#
For example;
sudo bmaptool copy --bmap build/tmp_baremetal/deploy/images/ava/ewaol-baremetal-sdk-image-ava.wic.bmap build/tmp_baremetal/deploy/images/ava/ewaol-baremetal-sdk-image-ava.wic.gz /dev/sdb
Extend rootfs partition#
Follow the instructions Extend rootfs partition.
Boot your machine#
You can see XFCE desktop.
NVIDIA driver installation#
-
Create the files required for compiling external modules.
cd /usr/src/kernel make modules_prepare
-
Check NVIDIA graphics card.
lspci | grep -i nvidia
You can find a NVIDIA graphics card such as
GeForce RTX 3070 Ti
.000d:01:00.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3070 Ti] (rev a1) 000d:01:00.1 Audio device: NVIDIA Corporation GA104 High Definition Audio Controller (rev a1)
-
Open the URL in browser.
-
Select your graphics card, then click
SEARCH
. -
Click
DOWNLOAD
. -
Copy link to the file.
-
Download NVIDIA driver on AVA platform.
For example;
wget https://jp.download.nvidia.com/XFree86/aarch64/515.65.01/NVIDIA-Linux-aarch64-515.65.01.run chmod +x NVIDIA-Linux-aarch64-515.65.01.run
-
Stop display manager to install NVIDIA driver.
systemctl stop xserver-nodm
-
Install NVIDIA driver.
For example;
./NVIDIA-Linux-aarch64-515.65.01.run
Building kernel module starts.
-
Press to select
Yes
and then press . -
Press .
Change display output from motherboard to GPU#
You are using VGA, so switch to GPU.
-
Turn off AVA platform
-
Connect HDMI or Display Port from your graphics card to your monitor.
-
Change display mode to HDMI or Display Port on your monitor if needed.
-
Turn on AVA platform, then the desktop window will be shown via GPU.
Confirm nvidia-docker works (Optional)#
You can confirm nvidia-docker works by the following command.
docker run --gpus all --rm nvidia/cuda-arm64:11.4.0-base nvidia-smi
You can see the outputs like below.
root@ava:~# docker run --gpus all --rm nvidia/cuda-arm64:11.4.0-base nvidia-smi
Unable to find image 'nvidia/cuda-arm64:11.4.0-base' locally
11.4.0-base: Pulling from nvidia/cuda-arm64
55c604a74c4b: Pull complete
657fae4b9575: Pull complete
b2cf3c1bfea9: Pull complete
71492f856142: Pull complete
c74b3fce51ac: Pull complete
Digest: sha256:625c8265d0f88d4250d48958113f1184f96db794fbe5d6d5cdd782f9916ec718
Status: Downloaded newer image for nvidia/cuda-arm64:11.4.0-base
Thu Aug 25 23:17:40 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01 Driver Version: 515.65.01 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 0000000D:01:00.0 On | N/A |
| 0% 35C P8 18W / 290W | 234MiB / 8192MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+