-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a flavour of Containers base image that includes nvidia drivers
I'm pretty sure this won't work as-is, as we're not running the default Debian kernel, but what I'm hoping to achieve with this is to get the build infrastructure working. Bug: 289334314 Change-Id: I15499e795c2d3412830f4fe539dd2afa191b1f7e
- Loading branch information
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# The expectation is that we build `base_image.Dockerfile` before this one. | ||
# hadolint ignore=DL3007 | ||
FROM oak-containers-sysimage-base:latest | ||
|
||
# We need to enable `contrib` for `nvidia-support`. | ||
RUN sed -i -e '/^Components: main/cComponents: main contrib' \ | ||
/etc/apt/sources.list.d/debian.sources | ||
|
||
RUN apt-get --yes update \ | ||
&& apt-get install --yes --no-install-recommends \ | ||
curl ca-certificates | ||
|
||
RUN curl -O -L https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb \ | ||
&& dpkg -i cuda-keyring_1.1-1_all.deb \ | ||
&& rm -f cuda-keyring_1.1-1_all.deb | ||
|
||
RUN apt-get --yes update \ | ||
&& apt-get install --yes --no-install-recommends \ | ||
cuda-toolkit-12-4 nvidia-driver \ | ||
# Cleanup | ||
&& apt-get clean \ | ||
&& rm --recursive --force /var/lib/apt/lists/* |