We have been using this approach to install nvidia drivers inside the containers - NVIDIA drivers on Intel Nuc
But current HOST OS version(balenaOS 2.50.1+rev1) doesn’t seem to support nvidia-driver-435 any more.
FROM balenalib/%%BALENA_MACHINE_NAME%%-ubuntu-python:3.6-bionic-build
ENV RESINOS_VERSION=2.50.1%2Brev1.prod
ENV DEBIAN_FRONTEND=noninteractive
ENV YOCTO_VERSION=5.2.10
RUN wget https://files.resin.io/images/intel-nuc/${RESINOS_VERSION}/kernel_modules_headers.tar.gz
RUN tar -xf kernel_modules_headers.tar.gz && rm -rf kernel_modules_headers.tar.gz
RUN mkdir -p /lib/modules/${YOCTO_VERSION}-yocto-standard
RUN mv ./kernel_modules_headers /lib/modules/${YOCTO_VERSION}-yocto-standard/build
RUN ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2
RUN apt-get update && apt-get install -y apt-transport-https
RUN apt-get install -y nvidia-driver-435 libboost-all-dev
ENV UDEV=1
ENV INITSYSTEM on
CMD [ "sleep", "infinity"]
I can’t find /lib/modules/${YOCTO_VERSION}-yocto-standard/build directory though I moved the linux headers in my Dockerfile.
I even tried to mount it as it was read-only and tried to copy header files manually, but it says out of space!
Found these interesting links:
How can I upgrade my balena-supervisor from 11.4.10 to the version that supports io.balena.features.gpu? And maybe I have to update the hostOS from balenaOS 2.50.1+rev1 to the latest?
Hi Shane, just reading through this thread. My colleagues above reproduced the failure as:
[main] Reading state information...
[main] E: Unable to locate package nvidia-driver-435
You are basing your image on Ubuntu bionic, as in:
FROM balenalib/%%BALENA_MACHINE_NAME%%-ubuntu-python:3.6-bionic-build
But I don’t see the nvidia-driver-435 appearing on the bionic default feeds according to packages.ubuntu.com. It does appear both in focal or in the bionic-updates feed.
However you mention this was working for you before, so I am confused.
Can you please let us know what was the base image you using? Since I just did a test and I can install nvidia-driver-435 in balenalib/intel-nuc-ubuntu-python:3.6-bionic-build without any problem.
Looks like you are using balenalib/%%BALENA_MACHINE_NAME%%-ubuntu-python:3.6-bionic-build in your Dockerfile, can you please let us know what is your target device? Since it will not work if you’re pushing to a non-amd64 device.
Have you added the io.balena.features.gpu to your compose file? Please add it if it’s not there.
I also see there are some newer driver packages which are nvidia-driver-440 and nvidia-driver-450 so can you give them a try and let us know how it goes?
We are planning to do some Machine Learning & Computer Vision stuffs on the balenaOS by using Nvidia GPUs and Jetson boards(TX2/nano/Xavier). But none of them are working at the moment and we can’t do anything now.
Is there any hope that we can use GPU feature on balenaOS? @alexgg
You could see my comment here - https://github.com/balena-os/balena-jetson/issues/57#issuecomment-699830289