Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

balena-labs-research/balena-lumeo-gw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

balena-lumeo-gw

An x86 Lumeo gateway running on balena

Requires a supported NVIDIA gpu.

How it works

The gpu container downloads the kernel source file for our exact OS version, builds the NVIDIA modules, and loads them into the host OS. We install the same NVIDIA driver (must be same version as in the gpu container) into the lumeo base image. You must set all the variables listed below and make sure all versions of the NVIDIA driver as well as the kernel source file versions match.

Setup

Clone this repo to your development device then set the following values:

docker-compose settings

  • Set the LUMEO_APP_ID and LUMEO_API_KEY environment variables to values found in your Lumeo console. You could also define these in the balenaCloud dashboard as fleet or device variables.

gpu container settings

  • VERSION is the version of balenaOS being used on your device. This needs to be URL-encoded, so a plus sign (+) if present needs to be written as %2B.

  • BALENA_MACHINE_NAME is the device type of your balenaOS from this list

  • set the YOCTO_VERSION to the version of Yocto Linux used to build your version of balenaOS. You can find it by logging into your host OS and typing: uname -r - in our example, we used balenaOS 2.113.4

settings in both containers

  • NVIDIA_DRIVER_VERSION is the version of the Nvidia driver to download and build using the list found here It needs to be compatible with the version in the underlying Lumeo base image, and must be the same in both the lumeo and gpu containers.

Pushing the code

Flash your device with a provisioned balenaOS image from your balenaCloud dashboard (or see preloading as well)

Use the balena CLI to push this code to your devices. The gateway should then eventually show up in your Lumeo console.

You may need to reboot after your gateway updates! If everything is set up properly, you should see the output below (for your gpu model) in the terminal:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.86       Driver Version: 470.86       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| 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  Quadro P400         Off  | 00000000:01:00.0 Off |                  N/A |
| 22%   37C    P0    N/A /  N/A |      0MiB /  2000MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+ 

see also

This is based on https://github.com/balena-io-examples/nvidia-x86 for running NVIDIA gpus on balena.

About

An x86 Lumeo gateway running on balena

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published