diff --git a/content/en/os/1.15.x/version-information/gpu-drivers/1.15.1/index.markdown b/content/en/os/1.15.x/version-information/gpu-drivers/1.15.1/index.markdown new file mode 100644 index 00000000..53d7b6a1 --- /dev/null +++ b/content/en/os/1.15.x/version-information/gpu-drivers/1.15.1/index.markdown @@ -0,0 +1,7 @@ ++++ +title = "1.15.1" +description = "Drivers included in each GPU-enabled variant" +type = "docs" ++++ + +{{< nvidia-versions >}} diff --git a/content/en/os/1.15.x/version-information/gpu-drivers/_index.markdown b/content/en/os/1.15.x/version-information/gpu-drivers/_index.markdown new file mode 100644 index 00000000..9a3a5bce --- /dev/null +++ b/content/en/os/1.15.x/version-information/gpu-drivers/_index.markdown @@ -0,0 +1,5 @@ ++++ +title = "GPU Driver Versions" +description = "Versions of GPU drivers included in each patch release of Bottlerocket" +type = "docs" ++++ \ No newline at end of file diff --git a/data/nvidia/1.15.1/kmod-5.10-nvidia.toml b/data/nvidia/1.15.1/kmod-5.10-nvidia.toml new file mode 100644 index 00000000..2d475b1b --- /dev/null +++ b/data/nvidia/1.15.1/kmod-5.10-nvidia.toml @@ -0,0 +1,28 @@ +# Extracted from https://github.com/bottlerocket-os/bottlerocket/tree/develop/packages/kmod-5.10-nvidia/Cargo.toml +[package] +name = "kmod-5_10-nvidia" +version = "0.1.0" +edition = "2021" +publish = false +build = "../build.rs" + +[lib] +path = "../packages.rs" + +[package.metadata.build-package] +package-name = "kmod-5.10-nvidia" +releases-url = "https://docs.nvidia.com/datacenter/tesla/" + +[[package.metadata.build-package.external-files]] +url = "https://us.download.nvidia.com/tesla/470.161.03/NVIDIA-Linux-x86_64-470.161.03.run" +sha512 = "26b1640f9427847b68233ffacf5c4a07e75ed9923429dfc9e5de3d7e5c1f109dfaf0fe0a0639cbd47f056784ed3e00e2e741d5c84532df79590a0c9ffa5ba625" +force-upstream = true + +[[package.metadata.build-package.external-files]] +url = "https://us.download.nvidia.com/tesla/470.161.03/NVIDIA-Linux-aarch64-470.161.03.run" +sha512 = "16e83c4d3ea66b2da07c43fca912c839e5feb9d42bee279b9de3476ffbd5e2314fddc83c1a38c198adb2d5ea6b4f2b00bb4a4c32d6fd0bfcdbccc392043f99ce" +force-upstream = true + +[build-dependencies] +glibc = { path = "../glibc" } +kernel-5_10 = { path = "../kernel-5.10" } diff --git a/data/nvidia/1.15.1/kmod-5.15-nvidia.toml b/data/nvidia/1.15.1/kmod-5.15-nvidia.toml new file mode 100644 index 00000000..dbeb38e0 --- /dev/null +++ b/data/nvidia/1.15.1/kmod-5.15-nvidia.toml @@ -0,0 +1,28 @@ +# Extracted from https://github.com/bottlerocket-os/bottlerocket/tree/develop/packages/kmod-5.15-nvidia/Cargo.toml +[package] +name = "kmod-5_15-nvidia" +version = "0.1.0" +edition = "2021" +publish = false +build = "../build.rs" + +[lib] +path = "../packages.rs" + +[package.metadata.build-package] +package-name = "kmod-5.15-nvidia" +releases-url = "https://docs.nvidia.com/datacenter/tesla/" + +[[package.metadata.build-package.external-files]] +url = "https://us.download.nvidia.com/tesla/515.86.01/NVIDIA-Linux-x86_64-515.86.01.run" +sha512 = "9a31e14afc017e847f1208577f597c490adb63c256d6dff1a9eae56b65cf85374a604516b0be9da7a43e9af93b3c5aec47b2ffefd6b4050a4b7e55f348cf4e7b" +force-upstream = true + +[[package.metadata.build-package.external-files]] +url = "https://us.download.nvidia.com/tesla/515.86.01/NVIDIA-Linux-aarch64-515.86.01.run" +sha512 = "43161f86143b1558d1f558acf4a060f53f538ea20e6235f76be24916fe4a9c374869645c7abf39eba66f1c2ca35f5d2b04f199bd1341b7ee6c1fdc879cb3ef96" +force-upstream = true + +[build-dependencies] +glibc = { path = "../glibc" } +kernel-5_15 = { path = "../kernel-5.15" } diff --git a/data/nvidia/1.15.1/kmod-6.1-nvidia.toml b/data/nvidia/1.15.1/kmod-6.1-nvidia.toml new file mode 100644 index 00000000..5cffb666 --- /dev/null +++ b/data/nvidia/1.15.1/kmod-6.1-nvidia.toml @@ -0,0 +1,28 @@ +# Extracted from https://github.com/bottlerocket-os/bottlerocket/tree/develop/packages/kmod-6.1-nvidia/Cargo.toml +[package] +name = "kmod-6_1-nvidia" +version = "0.1.0" +edition = "2021" +publish = false +build = "../build.rs" + +[lib] +path = "../packages.rs" + +[package.metadata.build-package] +package-name = "kmod-6.1-nvidia" +releases-url = "https://docs.nvidia.com/datacenter/tesla/" + +[[package.metadata.build-package.external-files]] +url = "https://us.download.nvidia.com/tesla/535.54.03/NVIDIA-Linux-x86_64-535.54.03.run" +sha512 = "45b72b34272d3df14b56136bb61537d00145d55734b72d58390af4694d96f03b2b49433beb4a5bede4d978442b707b08e05f2f31b2fcfd9453091e7f0b945cff" +force-upstream = true + +[[package.metadata.build-package.external-files]] +url = "https://us.download.nvidia.com/tesla/535.54.03/NVIDIA-Linux-aarch64-535.54.03.run" +sha512 = "57b06a6fa16838176866c364a8722c546084529ad91c57e979aca7750692127cab1485b5a44aee398c5494782ed987e82f66061aa39e802bc6eefa2b40a33bc3" +force-upstream = true + +[build-dependencies] +glibc = { path = "../glibc" } +kernel-6_1 = { path = "../kernel-6.1" } diff --git a/layouts/shortcodes/nvidia-versions.html b/layouts/shortcodes/nvidia-versions.html new file mode 100644 index 00000000..6c0d85a8 --- /dev/null +++ b/layouts/shortcodes/nvidia-versions.html @@ -0,0 +1,48 @@ + + + + + + + + + + + +{{- $full_bottlerocket_version := .Page.Params.title -}} +{{- $minor_bottlerocket_version_parts := split $full_bottlerocket_version "." -}} +{{- $minor_bottlerocket_release_line := print (index $minor_bottlerocket_version_parts 0) "." (index $minor_bottlerocket_version_parts 1) ".x" -}} +{{- $kmod_data := index $.Site.Data.nvidia $full_bottlerocket_version -}} +{{- $kernel_to_nvidia := dict -}} + +{{- range $kmod_fname, $kmod_data := $kmod_data -}} + {{- $k_version := index (split $kmod_fname "-") 1 -}} + {{- $external_files := index (index (index (index $kmod_data "package") "metadata") "build-package") "external-files" -}} + {{- $url := index (index $external_files 0) "url" -}} + {{- $version := (path.Split (path.Dir $url)).File -}} + {{- $kernel_to_nvidia = merge $kernel_to_nvidia (dict $k_version $version) -}} +{{- end -}} + + +{{- with $.Site.Data.variants -}} + {{- $release_variants := index $.Site.Data.variants $minor_bottlerocket_release_line -}} + {{ range $variant_name, $variant_info := $release_variants }} + {{- if (strings.Contains $variant_name "nvidia") -}} + + + {{- $packages := (index (index (index (index $variant_info "package" ) "metadata") "build-variant") "included-packages") -}} + {{- $kernel := "" -}} + {{- range $packages -}} + {{- if (strings.Contains . "kernel-") -}} + {{- $kernel = index (split . "-") 1 -}} + {{- end -}} + {{- end -}} + + + + {{- end -}} + {{- end -}} +{{- end -}} + + +
VariantKernel VersionNVIDIA Driver Version
{{ $variant_name }}{{ $kernel }}{{ index $kernel_to_nvidia $kernel }}
\ No newline at end of file diff --git a/scripts/nvidia-driver-versions/README.md b/scripts/nvidia-driver-versions/README.md new file mode 100644 index 00000000..71eb1e7f --- /dev/null +++ b/scripts/nvidia-driver-versions/README.md @@ -0,0 +1,39 @@ +# Script: NVIDIA version information + +This script is used to generate the file and data for `[lang]/os/[version line]/version-information/gpu-drivers/[full version]`. You will need to run it on every minor version. + +## Prerequisites + +This script works on Linux or MacOS and is unlikely to work in Windows. The directory structure used in the script specifically ties to bottlerocket-os/bottlerocket; it's unlikely to work in any other context. + +Before you begin, clone bottlerocket-os/bottlerocket outside the project-website directory. + +## Running the scripts + +There are three scripts in this directory: + +- `get_cargos.sh`: find all the variant's NVIDIA `Cargo.toml` files inside the [bottlerocket repo](https://github.com/bottlerocket-os/bottlerocket/tree/develop/packages/) and run `create_data_file_from_cargo.sh` on each. +- `create_data_file_from_cargo.sh`: Read a single `Cargo.toml` file and copy/transform it into a hugo data file. +- `create_markdown.sh`: Creates the markdown file for `[lang]/os/[version line]/version-information/gpu-drivers/[full version]` + +### Copy/transform all `Cargo.toml` files into a hugo data files + +This script will find all the `Cargo.toml` files in the specified path and run `create_data_file_from_cargo.sh` for each. + +Make the sure the directory in the second argument exists already. + +```bash +./get_cargos.sh /path/to/bottlerocket-repo /path/to/website/data/nvidia/1.15.1/ +``` + +(Note the lack of a trailing slash on the first argument and the inclusion of a trailing slash on the second. This is important.) + +This will create a new data file for each package in `/path/to/bottlerocket-repo/packages/` that matches the pattern `kmod--nvidia`. + +### Create the page + +Create the markdown page which will make the data visible. + +```bash +./create_markdown.sh /path/to/site/content/en/os/1.15.x/version-information/gpu-drivers 1.15.2 +``` diff --git a/scripts/nvidia-driver-versions/create_data_file_from_cargo.sh b/scripts/nvidia-driver-versions/create_data_file_from_cargo.sh new file mode 100755 index 00000000..20ea953d --- /dev/null +++ b/scripts/nvidia-driver-versions/create_data_file_from_cargo.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +FNAME="$(echo $1 | awk -F/ '{print $(NF-1)}')" +EXTRACTED="# Extracted from https://github.com/bottlerocket-os/bottlerocket/tree/develop/packages/$FNAME/Cargo.toml" +echo $EXTRACTED > $2$FNAME.toml +cat $1 >> $2$FNAME.toml diff --git a/scripts/nvidia-driver-versions/create_markdown.sh b/scripts/nvidia-driver-versions/create_markdown.sh new file mode 100755 index 00000000..80f79e24 --- /dev/null +++ b/scripts/nvidia-driver-versions/create_markdown.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +mkdir $1/$2 + +cat << EOF > $1/$2/index.markdown ++++ +title = "${2}" +description = "Drivers included in each GPU-enabled variant" +type = "docs" ++++ + +{{< nvidia-versions >}} +EOF \ No newline at end of file diff --git a/scripts/nvidia-driver-versions/get_cargos.sh b/scripts/nvidia-driver-versions/get_cargos.sh new file mode 100755 index 00000000..dae52378 --- /dev/null +++ b/scripts/nvidia-driver-versions/get_cargos.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# find $1/* -name "Cargo.toml" -exec bash create_data_file_from_cargo.sh {} $2 \; +find $1/packages/kmod-* -name "Cargo.toml" -exec bash create_data_file_from_cargo.sh {} $2 \; \ No newline at end of file