# Browser/Dashboard for the Jetson Nano

**URL:** <https://forums.balena.io/t/browser-dashboard-for-the-jetson-nano/17492>\
**Category:** Project help\
**Created:** [July 3, 2019, 6:22pm UTC](https://forums.balena.io/t/browser-dashboard-for-the-jetson-nano/17492 "2019-07-03T18:22:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cody](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@Cody](https://forums.balena.io/u/Cody)\
**Post date:** [July 3, 2019, 6:22pm UTC](https://forums.balena.io/t/browser-dashboard-for-the-jetson-nano/17492/1 "2019-07-03T18:22:26Z")

</div>

I’m curious if anyone has tried to build a BalenaDash type app for the Jetson Nano. I’ve had some things the Raspberry Pi’s just don’t play out smoothly and was curious if the Jetson Nano might have any better luck.

---

<div class="post-metadata">

**Author:** ![wrboyce](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/wrboyce/32/374_2.png) [@wrboyce](https://forums.balena.io/u/wrboyce)\
**Post date:** [July 3, 2019, 6:38pm UTC](https://forums.balena.io/t/browser-dashboard-for-the-jetson-nano/17492/4 "2019-07-03T18:38:55Z")

</div>

I’ve had an ask around and nobody at Balena has tried it, but there was certainly some interest if you can make it work! One suggestion I’ve been told to pass along is first trying to run chrome with the `--egl` flag to see if it can actually utilise the GPU.

---

<div class="post-metadata">

**Author:** ![zrzka](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/zrzka/32/1612_2.png) [@zrzka](https://forums.balena.io/u/zrzka)\
**Post date:** [July 4, 2019, 9:09am UTC](https://forums.balena.io/t/browser-dashboard-for-the-jetson-nano/17492/6 "2019-07-04T09:09:51Z")

</div>

Hi,

based on my experience with Jetson Nano, I don’t think that adding `--egl / --use-gl=egl` flag will help here. NVIDIA provides [NVIDIA JetPack SDK](https://developer.nvidia.com/embedded/jetpack), which can either download DEB packages & drivers & configurations or prepare & flash the OS for you. The are two problems:

- you/we are not allowed to redistribute due to the license,
- you can’t use this prepared OS directly with balenaCloud.

But you can prepare your own image.

## JetPack SDK

### Download

- Register at NVIDIA developers portal
- Download [NVIDIA JetPack SDK](https://developer.nvidia.com/embedded/jetpack)
- Launch SDK manager, sign in, select packages and download them (Linux required or VMware Fusion running Linux if you’re on a Mac)
- If everything goes well, all packages & drivers are in the `~/Downloads/nvidia/sdkm_downloads` folder

### Prepare for Dockerfile

There’s a lot of files in the `sdkm_downloads` folder and you don’t need all of them. You have to write a script, like [this one](https://github.com/balena-io-playground/balena-nanny-bot/blob/master/prepare.sh), which can extract what you need and place it in some folder. Check [this part](https://github.com/balena-io-playground/balena-nanny-bot/blob/13bd540a1599434ba76d22667c97c4e54d71abe6/prepare.sh#L54-L59) mainly. You’ll need:

- `Jetson-210_Linux_R32.1.0_aarch64.tbz2/Linux_for_Tegra/nv_tegra/config.tbz2`
- `Jetson-210_Linux_R32.1.0_aarch64.tbz2/Linux_for_Tegra/nv_tegra/nvidia_drivers.tbz2`

### Install

[Sample Dockerfile](https://github.com/balena-io-playground/balena-nanny-bot/blob/13bd540a1599434ba76d22667c97c4e54d71abe6/jetbot/Dockerfile#L38-L58). Minimised version:

```auto
# NVIDIA JetPack SDK & drivers (1.7GB)
ADD nvidia /usr/src/app/nvidia

# Install NVIDIA JetPack SDK & drivers & toolchain
RUN \
  tar xjf nvidia/nvidia_drivers.tbz2 -C / && \
  tar xjf nvidia/config.tbz2 -C / --exclude=etc/hosts --exclude=etc/hostname && \
  cp /usr/lib/aarch64-linux-gnu/tegra-egl/nvidia.json /usr/share/glvnd/egl_vendor.d/10_nvidia.json && \
  echo "/usr/lib/aarch64-linux-gnu/tegra" > /etc/ld.so.conf.d/nvidia-tegra.conf && \
  echo "/usr/lib/aarch64-linux-gnu/tegra-egl" > /etc/ld.so.conf.d/nvidia-tegra-egl.conf && \
  ldconfig && \
  rm -rf nvidia

```

What it does?

- Extracts drivers
- Extracts configurations
- Tells the system to prefer NVIDIA EGL instead of the MESA
- Adds `/usr/lib/aarch64-linux-gnu/tegra` & `/usr/lib/aarch64-linux-gnu/tegra-egl` to the libraries paths

### SYS\_RAWIO

Not sure if you really need this step for your use case, but it won’t hurt. I had to use `docker-compose.yml` file, because `SYS_RAWIO` capability was required. It looked like it’s working, but it wasn’t till I did add it. Here’s [an example](https://github.com/balena-io-playground/balena-nanny-bot/blob/13bd540a1599434ba76d22667c97c4e54d71abe6/docker-compose.yml). IIRC it was because of the camera, you probably don’t need it, but mentioning it anyway.

## Other examples

There’s [nano-sample-app](https://github.com/acostach/nano-sample-app). I used this project as a foundation for my [nanny-bot](https://github.com/balena-io-playground/balena-nanny-bot) & this post.

I think that now is the time to test the `--use-gl=egl` / `--egl` flags.

---

<div class="post-metadata">

**Author:** ![Cody](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@Cody](https://forums.balena.io/u/Cody)\
**Post date:** [July 5, 2019, 9:01pm UTC](https://forums.balena.io/t/browser-dashboard-for-the-jetson-nano/17492/9 "2019-07-05T21:01:57Z")

</div>

Thanks for the feedback! I had ordered a Jetson Nano to experiment with. I like to think I’m a little bit saavy with some of these things some of it may be a bit above my skill level. I’ll post back if I figure anything out.
