Skip to content

Update examples and remove balenalib base images#13

Open
alanb128 wants to merge 3 commits intomasterfrom
alanb128-2025-cleanup
Open

Update examples and remove balenalib base images#13
alanb128 wants to merge 3 commits intomasterfrom
alanb128-2025-cleanup

Conversation

@alanb128
Copy link
Contributor

@alanb128 alanb128 commented Jan 6, 2026

Change-type: patch
Signed-off-by: Alan Boris alan@balena.io

alanb128 and others added 2 commits January 5, 2026 23:35
Change-type: patch
Signed-off-by: Alan Boris alan@balena.io
Signed-off-by: Alan Boris <alan@balena.io>
@@ -1,24 +1,24 @@
FROM balenalib/genericx86-64-ext-ubuntu:focal
FROM ubuntu:jammy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to use 22 (jammy) instead of 24 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

24 causes the build to fail with some sort of PyTorch dependency issue that's not worth delving into for this example...


RUN find /usr/src/nvidia/${NVIDIA_DRIVER}/kernel -name "*.ko" -exec mv {} . \;
# change the line above as follows for the open source driver:
# RUN find /usr/src/nvidia/${NVIDIA_DRIVER}/kernel-open -name "*.ko" -exec mv {} . \;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How difficult would it be to make this a parameter? Something like OPEN_DRIVER=1 or BUILD_PROPRIETARY=1 specified at the top next to the driver version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I try to avoid conditional logic in a Dockerfile, but I guess I could put some shell scripting within a RUN instruction like this unless you have a better suggestion?

ARG OPEN_DRIVER=1

RUN if [ "$OPEN_DRIVER" = "1" ]; then \
    echo "Building the open driver..."; \
    find /usr/src/nvidia/${NVIDIA_DRIVER}/kernel-open -name "*.ko" -exec mv {} .  \
else \
    echo "Building the proprietary driver..."; \
    find /usr/src/nvidia/${NVIDIA_DRIVER}/kernel -name "*.ko" -exec mv {} .  \
fi


RUN find /usr/src/nvidia/${NVIDIA_DRIVER}/kernel -name "*.ko" -exec mv {} . \;
# change the line above as follows for the open source driver:
# RUN find /usr/src/nvidia/${NVIDIA_DRIVER}/kernel-open -name "*.ko" -exec mv {} . \;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in the cuda container, it would be great if we could have the open/proprietary switch as a parameter at the top and just deal with the paths automatically here.


# ***** Make sure to change the line below to match your driver version in the Dockerfile! *****

cp /usr/src/nvidia/NVIDIA-Linux-x86_64-580.95.05/firmware/gsp_ga10x.bin /data
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get away with a wildcard? e.g.

  • cp /usr/src/nvidia/NVIDIA-Linux-x86_64-*/firmware/gsp_ga10x.bin /data
  • or even cp /usr/src/nvidia/*/firmware/gsp_ga10x.bin /data

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a GPU that loads firmware, so I don't really have a way to test if wildcards will work.

Signed-off-by: Alan Boris <alan@balena.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants