Skip to content

canonical/nvidia-assemble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 

Repository files navigation

NVIDIA Assemble Snap

This repository contains source code for an auxiliary snap that assists in assembling and loading NVIDIA drivers.

Installing this snap implies consent with NVIDIA license.

When installed together with a compatible kernel snap, an attempt will be made to assemble, load and setup NVIDIA graphics drivers on an Ubuntu Core system.

Quick Start on Ubuntu Core 22

# snapd2.59 is required
$ snap refresh snapd
$ snap install nvidia-assemble --channel 22/stable

Quick Checks

$ sudo ls -latr /dev/nvidia*
$ sudo lsmod | grep nvidia

Expectation is that /dev/nvidia devices are available on the system, and that nvidia drivers are loaded into the kernel.

Quick Demo

Install content provider with userspace libraries, install sample demo apps, and connect the content provider.

$ snap install nvidia-core22
$ snap install graphics-core22-samples
$ snap connect graphics-core22-samples:graphics-core22 nvidia-core22:graphics-core22
$ snap connect graphics-core22-samples:hardware-observe
$ snap connect graphics-core22-samples:kernel-module-observe
$ snap connect graphics-core22-samples:network-bind
$ snap connect graphics-core22-samples:opengl

After above setup is done one can query EGL card information, query CUDA device information, and execute a sample CUDA application:

$ graphics-core22-samples.eglinfo
$ graphics-core22-samples.deviceQuery
$ graphics-core22-samples.bandwidthTest

How to use drivers from your own snap

Once the drivers are available on the system, one can use nvidia-core22 graphics-core22 content interface provider in your snap to provide userspace libraries to access NVIDIA graphics card functionality. This content interface can be used if stock userspace libraries are sufficient for a given snap, or if one wants to share userspace libraries across multiple snaps. Alternatively, one can simply stage one's own userspace dependencies as required.

Samples of GL & CUDA CLI applications are available from graphics-core22-samples. This is an example snap that vendors existing GL binaries, and complies a CUDA binary from source. The snapcraft.yaml for this sample removes staged libraries from the snap, such that at runtime all libraries are used from the nvidia-core22 graphics-core22 content provider.

Troubleshooting

First is to check that kernel contains nvidia driver components:

$ sudo ls /lib/modules/*/kernel | grep nvidia

To troubleshoot further collect dmesg output and output from snap installations:

$ sudo journalctl -b -k
$ sudo journalctl -b -u snap.nvidia-assemble.service

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages