feat: add nvidia-open images (#69)
Co-authored-by: Niklas <40402114+NiHaiden@users.noreply.github.com>
This commit is contained in:
parent
52a9730248
commit
75c473bebd
6 changed files with 26 additions and 39 deletions
2
.github/workflows/build-image-latest.yml
vendored
2
.github/workflows/build-image-latest.yml
vendored
|
|
@ -23,7 +23,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
brand_name: ["aurora"]
|
brand_name: ["aurora"]
|
||||||
with:
|
with:
|
||||||
image_flavors: '["main", "nvidia", "hwe", "hwe-nvidia"]'
|
image_flavors: '["main", "nvidia", "nvidia-open", "hwe", "hwe-nvidia", "hwe-nvidia-open"]'
|
||||||
brand_name: ${{ matrix.brand_name }}
|
brand_name: ${{ matrix.brand_name }}
|
||||||
stream_name: latest
|
stream_name: latest
|
||||||
# This needs splitting, right now a kernel pin will not work due to hwe kernel
|
# This needs splitting, right now a kernel pin will not work due to hwe kernel
|
||||||
|
|
|
||||||
2
.github/workflows/build-iso-latest.yml
vendored
2
.github/workflows/build-iso-latest.yml
vendored
|
|
@ -20,6 +20,6 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
brand_name: ${{ fromJson(inputs.brand_name || '["aurora"]') }}
|
brand_name: ${{ fromJson(inputs.brand_name || '["aurora"]') }}
|
||||||
with:
|
with:
|
||||||
image_flavors: '["main", "nvidia", "hwe", "hwe-nvidia"]'
|
image_flavors: '["main", "nvidia", "nvidia-open", "hwe", "hwe-nvidia", "hwe-nvidia-open"]'
|
||||||
brand_name: ${{ matrix.brand_name }}
|
brand_name: ${{ matrix.brand_name }}
|
||||||
stream_name: latest
|
stream_name: latest
|
||||||
|
|
|
||||||
2
.github/workflows/reusable-build-iso.yml
vendored
2
.github/workflows/reusable-build-iso.yml
vendored
|
|
@ -4,7 +4,7 @@ on:
|
||||||
inputs:
|
inputs:
|
||||||
image_flavors:
|
image_flavors:
|
||||||
description: "JSON string of flavors to build, '[main, nvidia, hwe, hwe-nvidia]'"
|
description: "JSON string of flavors to build, '[main, nvidia, hwe, hwe-nvidia]'"
|
||||||
default: "['main', 'nvidia']"
|
default: "['main', 'nvidia', 'nvidia-open']"
|
||||||
type: string
|
type: string
|
||||||
brand_name:
|
brand_name:
|
||||||
description: "The Brand Name: aurora"
|
description: "The Brand Name: aurora"
|
||||||
|
|
|
||||||
2
.github/workflows/reusable-build.yml
vendored
2
.github/workflows/reusable-build.yml
vendored
|
|
@ -4,7 +4,7 @@ on:
|
||||||
inputs:
|
inputs:
|
||||||
image_flavors:
|
image_flavors:
|
||||||
description: "JSON string of flavors to build, '[main, nvidia, hwe, hwe-nvidia]'"
|
description: "JSON string of flavors to build, '[main, nvidia, hwe, hwe-nvidia]'"
|
||||||
default: "['main', 'nvidia']"
|
default: "['main', 'nvidia', 'nvidia-open']"
|
||||||
type: string
|
type: string
|
||||||
brand_name:
|
brand_name:
|
||||||
description: "The Brand Name: aurora"
|
description: "The Brand Name: aurora"
|
||||||
|
|
|
||||||
46
Justfile
46
Justfile
|
|
@ -8,12 +8,16 @@ images := '(
|
||||||
flavors := '(
|
flavors := '(
|
||||||
[main]=main
|
[main]=main
|
||||||
[nvidia]=nvidia
|
[nvidia]=nvidia
|
||||||
|
[nvidia-open]=nvidia-open
|
||||||
[hwe]=hwe
|
[hwe]=hwe
|
||||||
[hwe-nvidia]=hwe-nvidia
|
[hwe-nvidia]=hwe-nvidia
|
||||||
|
[hwe-nvidia-open]=hwe-nvidia-open
|
||||||
[asus]=asus
|
[asus]=asus
|
||||||
[asus-nvidia]=asus-nvidia
|
[asus-nvidia]=asus-nvidia
|
||||||
|
[asus-nvidia-open]=asus-nvidia-open
|
||||||
[surface]=surface
|
[surface]=surface
|
||||||
[surface-nvidia]=surface-nvidia
|
[surface-nvidia]=surface-nvidia
|
||||||
|
[surface-nvidia-open]=surface-nvidia-open
|
||||||
)'
|
)'
|
||||||
tags := '(
|
tags := '(
|
||||||
[stable]=stable
|
[stable]=stable
|
||||||
|
|
@ -67,17 +71,13 @@ sudo-clean:
|
||||||
# Check if valid combo
|
# Check if valid combo
|
||||||
[group('Utility')]
|
[group('Utility')]
|
||||||
[private]
|
[private]
|
||||||
validate image="" tag="" flavor="":
|
validate $image $tag $flavor:
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
set -eou pipefail
|
set -eou pipefail
|
||||||
declare -A images={{ images }}
|
declare -A images={{ images }}
|
||||||
declare -A tags={{ tags }}
|
declare -A tags={{ tags }}
|
||||||
declare -A flavors={{ flavors }}
|
declare -A flavors={{ flavors }}
|
||||||
|
|
||||||
image={{ image }}
|
|
||||||
tag={{ tag }}
|
|
||||||
flavor={{ flavor }}
|
|
||||||
|
|
||||||
# Handle Stable Daily
|
# Handle Stable Daily
|
||||||
if [[ "${tag}" == "stable-daily" ]]; then
|
if [[ "${tag}" == "stable-daily" ]]; then
|
||||||
tag="stable"
|
tag="stable"
|
||||||
|
|
@ -125,12 +125,9 @@ sudoif command *args:
|
||||||
|
|
||||||
# Build Image
|
# Build Image
|
||||||
[group('Image')]
|
[group('Image')]
|
||||||
build image="aurora" tag="latest" flavor="main" rechunk="0" ghcr="0" pipeline="0" kernel_pin="":
|
build $image="aurora" $tag="latest" $flavor="main" rechunk="0" ghcr="0" pipeline="0" $kernel_pin="":
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
set -eoux pipefail
|
set -eoux pipefail
|
||||||
image={{ image }}
|
|
||||||
tag={{ tag }}
|
|
||||||
flavor={{ flavor }}
|
|
||||||
|
|
||||||
# Validate
|
# Validate
|
||||||
just validate "${image}" "${tag}" "${flavor}"
|
just validate "${image}" "${tag}" "${flavor}"
|
||||||
|
|
@ -169,7 +166,6 @@ build image="aurora" tag="latest" flavor="main" rechunk="0" ghcr="0" pipeline="0
|
||||||
just verify-container "${base_image_name}-main:${fedora_version}"
|
just verify-container "${base_image_name}-main:${fedora_version}"
|
||||||
|
|
||||||
# Kernel Release/Pin
|
# Kernel Release/Pin
|
||||||
kernel_pin="{{ kernel_pin }}"
|
|
||||||
if [[ -z "${kernel_pin:-}" ]]; then
|
if [[ -z "${kernel_pin:-}" ]]; then
|
||||||
kernel_release=$(skopeo inspect --retry-times 3 docker://ghcr.io/ublue-os/${akmods_flavor}-kernel:"${fedora_version}" | jq -r '.Labels["ostree.linux"]')
|
kernel_release=$(skopeo inspect --retry-times 3 docker://ghcr.io/ublue-os/${akmods_flavor}-kernel:"${fedora_version}" | jq -r '.Labels["ostree.linux"]')
|
||||||
else
|
else
|
||||||
|
|
@ -182,7 +178,9 @@ build image="aurora" tag="latest" flavor="main" rechunk="0" ghcr="0" pipeline="0
|
||||||
if [[ "${akmods_flavor}" =~ coreos ]]; then
|
if [[ "${akmods_flavor}" =~ coreos ]]; then
|
||||||
just verify-container "akmods-zfs:${akmods_flavor}-${fedora_version}-${kernel_release}"
|
just verify-container "akmods-zfs:${akmods_flavor}-${fedora_version}-${kernel_release}"
|
||||||
fi
|
fi
|
||||||
if [[ "${flavor}" =~ nvidia ]]; then
|
if [[ "${flavor}" =~ nvidia-open ]]; then
|
||||||
|
just verify-container "akmods-nvidia-open:${akmods_flavor}-${fedora_version}-${kernel_release}"
|
||||||
|
elif [[ "${flavor}" =~ nvidia ]]; then
|
||||||
just verify-container "akmods-nvidia:${akmods_flavor}-${fedora_version}-${kernel_release}"
|
just verify-container "akmods-nvidia:${akmods_flavor}-${fedora_version}-${kernel_release}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -260,14 +258,10 @@ build-pipeline image="aurora" tag="latest" flavor="main" kernel_pin="":
|
||||||
# Rechunk Image
|
# Rechunk Image
|
||||||
[group('Image')]
|
[group('Image')]
|
||||||
[private]
|
[private]
|
||||||
rechunk image="aurora" tag="latest" flavor="main" ghcr="0" pipeline="0":
|
rechunk $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0":
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
set -eoux pipefail
|
set -eoux pipefail
|
||||||
|
|
||||||
image={{ image }}
|
|
||||||
tag={{ tag }}
|
|
||||||
flavor={{ flavor }}
|
|
||||||
|
|
||||||
# Validate
|
# Validate
|
||||||
just validate "${image}" "${tag}" "${flavor}"
|
just validate "${image}" "${tag}" "${flavor}"
|
||||||
|
|
||||||
|
|
@ -411,12 +405,9 @@ load-rechunk image="aurora" tag="latest" flavor="main":
|
||||||
|
|
||||||
# Run Container
|
# Run Container
|
||||||
[group('Image')]
|
[group('Image')]
|
||||||
run image="aurora" tag="latest" flavor="main":
|
run $image="aurora" $tag="latest" $flavor="main":
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
set -eoux pipefail
|
set -eoux pipefail
|
||||||
image={{ image }}
|
|
||||||
tag={{ tag }}
|
|
||||||
flavor={{ flavor }}
|
|
||||||
|
|
||||||
# Validate
|
# Validate
|
||||||
just validate "${image}" "${tag}" "${flavor}"
|
just validate "${image}" "${tag}" "${flavor}"
|
||||||
|
|
@ -435,12 +426,9 @@ run image="aurora" tag="latest" flavor="main":
|
||||||
|
|
||||||
# Build ISO
|
# Build ISO
|
||||||
[group('ISO')]
|
[group('ISO')]
|
||||||
build-iso image="aurora" tag="latest" flavor="main" ghcr="0" pipeline="0":
|
build-iso $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0":
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
set -eoux pipefail
|
set -eoux pipefail
|
||||||
image={{ image }}
|
|
||||||
tag={{ tag }}
|
|
||||||
flavor={{ flavor }}
|
|
||||||
|
|
||||||
# Validate
|
# Validate
|
||||||
just validate "${image}" "${tag}" "${flavor}"
|
just validate "${image}" "${tag}" "${flavor}"
|
||||||
|
|
@ -570,12 +558,9 @@ build-iso-ghcr image="aurora" tag="latest" flavor="main":
|
||||||
|
|
||||||
# Run ISO
|
# Run ISO
|
||||||
[group('ISO')]
|
[group('ISO')]
|
||||||
run-iso image="aurora" tag="latest" flavor="main":
|
run-iso $image="aurora" $tag="latest" $flavor="main":
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
set -eoux pipefail
|
set -eoux pipefail
|
||||||
image={{ image }}
|
|
||||||
tag={{ tag }}
|
|
||||||
flavor={{ flavor }}
|
|
||||||
|
|
||||||
# Validate
|
# Validate
|
||||||
just validate "${image}" "${tag}" "${flavor}"
|
just validate "${image}" "${tag}" "${flavor}"
|
||||||
|
|
@ -654,12 +639,9 @@ verify-container container="" registry="ghcr.io/ublue-os" key="":
|
||||||
|
|
||||||
# Secureboot Check
|
# Secureboot Check
|
||||||
[group('Utility')]
|
[group('Utility')]
|
||||||
secureboot image="aurora" tag="latest" flavor="main":
|
secureboot $image="aurora" $tag="latest" $flavor="main":
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
set -eoux pipefail
|
set -eoux pipefail
|
||||||
image={{ image }}
|
|
||||||
tag={{ tag }}
|
|
||||||
flavor={{ flavor }}
|
|
||||||
|
|
||||||
# Validate
|
# Validate
|
||||||
just validate "${image}" "${tag}" "${flavor}"
|
just validate "${image}" "${tag}" "${flavor}"
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@ rpm-ostree install \
|
||||||
|
|
||||||
# RPMFUSION Dependent AKMODS
|
# RPMFUSION Dependent AKMODS
|
||||||
rpm-ostree install \
|
rpm-ostree install \
|
||||||
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
|
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-"$(rpm -E %fedora)".noarch.rpm \
|
||||||
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-"$(rpm -E %fedora)".noarch.rpm
|
||||||
rpm-ostree install \
|
rpm-ostree install \
|
||||||
broadcom-wl /tmp/akmods/kmods/*wl*.rpm \
|
broadcom-wl /tmp/akmods/kmods/*wl*.rpm \
|
||||||
v4l2loopback /tmp/akmods/kmods/*v4l2loopback*.rpm
|
v4l2loopback /tmp/akmods/kmods/*v4l2loopback*.rpm
|
||||||
|
|
@ -46,7 +46,11 @@ rpm-ostree uninstall rpmfusion-free-release rpmfusion-nonfree-release
|
||||||
# Nvidia AKMODS
|
# Nvidia AKMODS
|
||||||
if [[ "${IMAGE_NAME}" =~ nvidia ]]; then
|
if [[ "${IMAGE_NAME}" =~ nvidia ]]; then
|
||||||
# Fetch Nvidia RPMs
|
# Fetch Nvidia RPMs
|
||||||
skopeo copy --retry-times 3 docker://ghcr.io/ublue-os/akmods-nvidia:"${AKMODS_FLAVOR}"-"$(rpm -E %fedora)"-"${KERNEL}" dir:/tmp/akmods-rpms
|
if [[ "${IMAGE_NAME}" =~ open ]]; then
|
||||||
|
skopeo copy --retry-times 3 docker://ghcr.io/ublue-os/akmods-nvidia-open:"${AKMODS_FLAVOR}"-"$(rpm -E %fedora)"-"${KERNEL}" dir:/tmp/akmods-rpms
|
||||||
|
else
|
||||||
|
skopeo copy --retry-times 3 docker://ghcr.io/ublue-os/akmods-nvidia:"${AKMODS_FLAVOR}"-"$(rpm -E %fedora)"-"${KERNEL}" dir:/tmp/akmods-rpms
|
||||||
|
fi
|
||||||
NVIDIA_TARGZ=$(jq -r '.layers[].digest' < /tmp/akmods-rpms/manifest.json | cut -d : -f 2)
|
NVIDIA_TARGZ=$(jq -r '.layers[].digest' < /tmp/akmods-rpms/manifest.json | cut -d : -f 2)
|
||||||
tar -xvzf /tmp/akmods-rpms/"$NVIDIA_TARGZ" -C /tmp/
|
tar -xvzf /tmp/akmods-rpms/"$NVIDIA_TARGZ" -C /tmp/
|
||||||
mv /tmp/rpms/* /tmp/akmods-rpms/
|
mv /tmp/rpms/* /tmp/akmods-rpms/
|
||||||
|
|
@ -56,6 +60,7 @@ if [[ "${IMAGE_NAME}" =~ nvidia ]]; then
|
||||||
chmod +x /tmp/nvidia-install.sh
|
chmod +x /tmp/nvidia-install.sh
|
||||||
IMAGE_NAME="${BASE_IMAGE_NAME}" RPMFUSION_MIRROR="" /tmp/nvidia-install.sh
|
IMAGE_NAME="${BASE_IMAGE_NAME}" RPMFUSION_MIRROR="" /tmp/nvidia-install.sh
|
||||||
rm -f /usr/share/vulkan/icd.d/nouveau_icd.*.json
|
rm -f /usr/share/vulkan/icd.d/nouveau_icd.*.json
|
||||||
|
ln -sf libnvidia-ml.so.1 /usr/lib64/libnvidia-ml.so
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ZFS for stable
|
# ZFS for stable
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue