Update examples and remove balenalib base images#13
Conversation
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 | |||
There was a problem hiding this comment.
any reason to use 22 (jammy) instead of 24 here?
There was a problem hiding this comment.
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 {} . \; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 {} . \; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
Change-type: patch
Signed-off-by: Alan Boris alan@balena.io