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:
|
||||
brand_name: ["aurora"]
|
||||
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 }}
|
||||
stream_name: latest
|
||||
# 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:
|
||||
brand_name: ${{ fromJson(inputs.brand_name || '["aurora"]') }}
|
||||
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 }}
|
||||
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:
|
||||
image_flavors:
|
||||
description: "JSON string of flavors to build, '[main, nvidia, hwe, hwe-nvidia]'"
|
||||
default: "['main', 'nvidia']"
|
||||
default: "['main', 'nvidia', 'nvidia-open']"
|
||||
type: string
|
||||
brand_name:
|
||||
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:
|
||||
image_flavors:
|
||||
description: "JSON string of flavors to build, '[main, nvidia, hwe, hwe-nvidia]'"
|
||||
default: "['main', 'nvidia']"
|
||||
default: "['main', 'nvidia', 'nvidia-open']"
|
||||
type: string
|
||||
brand_name:
|
||||
description: "The Brand Name: aurora"
|
||||
|
|
|
|||
46
Justfile
46
Justfile
|
|
@ -8,12 +8,16 @@ images := '(
|
|||
flavors := '(
|
||||
[main]=main
|
||||
[nvidia]=nvidia
|
||||
[nvidia-open]=nvidia-open
|
||||
[hwe]=hwe
|
||||
[hwe-nvidia]=hwe-nvidia
|
||||
[hwe-nvidia-open]=hwe-nvidia-open
|
||||
[asus]=asus
|
||||
[asus-nvidia]=asus-nvidia
|
||||
[asus-nvidia-open]=asus-nvidia-open
|
||||
[surface]=surface
|
||||
[surface-nvidia]=surface-nvidia
|
||||
[surface-nvidia-open]=surface-nvidia-open
|
||||
)'
|
||||
tags := '(
|
||||
[stable]=stable
|
||||
|
|
@ -67,17 +71,13 @@ sudo-clean:
|
|||
# Check if valid combo
|
||||
[group('Utility')]
|
||||
[private]
|
||||
validate image="" tag="" flavor="":
|
||||
validate $image $tag $flavor:
|
||||
#!/usr/bin/bash
|
||||
set -eou pipefail
|
||||
declare -A images={{ images }}
|
||||
declare -A tags={{ tags }}
|
||||
declare -A flavors={{ flavors }}
|
||||
|
||||
image={{ image }}
|
||||
tag={{ tag }}
|
||||
flavor={{ flavor }}
|
||||
|
||||
# Handle Stable Daily
|
||||
if [[ "${tag}" == "stable-daily" ]]; then
|
||||
tag="stable"
|
||||
|
|
@ -125,12 +125,9 @@ sudoif command *args:
|
|||
|
||||
# Build 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
|
||||
set -eoux pipefail
|
||||
image={{ image }}
|
||||
tag={{ tag }}
|
||||
flavor={{ flavor }}
|
||||
|
||||
# Validate
|
||||
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}"
|
||||
|
||||
# Kernel Release/Pin
|
||||
kernel_pin="{{ kernel_pin }}"
|
||||
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"]')
|
||||
else
|
||||
|
|
@ -182,7 +178,9 @@ build image="aurora" tag="latest" flavor="main" rechunk="0" ghcr="0" pipeline="0
|
|||
if [[ "${akmods_flavor}" =~ coreos ]]; then
|
||||
just verify-container "akmods-zfs:${akmods_flavor}-${fedora_version}-${kernel_release}"
|
||||
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}"
|
||||
fi
|
||||
|
||||
|
|
@ -260,14 +258,10 @@ build-pipeline image="aurora" tag="latest" flavor="main" kernel_pin="":
|
|||
# Rechunk Image
|
||||
[group('Image')]
|
||||
[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
|
||||
set -eoux pipefail
|
||||
|
||||
image={{ image }}
|
||||
tag={{ tag }}
|
||||
flavor={{ flavor }}
|
||||
|
||||
# Validate
|
||||
just validate "${image}" "${tag}" "${flavor}"
|
||||
|
||||
|
|
@ -411,12 +405,9 @@ load-rechunk image="aurora" tag="latest" flavor="main":
|
|||
|
||||
# Run Container
|
||||
[group('Image')]
|
||||
run image="aurora" tag="latest" flavor="main":
|
||||
run $image="aurora" $tag="latest" $flavor="main":
|
||||
#!/usr/bin/bash
|
||||
set -eoux pipefail
|
||||
image={{ image }}
|
||||
tag={{ tag }}
|
||||
flavor={{ flavor }}
|
||||
|
||||
# Validate
|
||||
just validate "${image}" "${tag}" "${flavor}"
|
||||
|
|
@ -435,12 +426,9 @@ run image="aurora" tag="latest" flavor="main":
|
|||
|
||||
# Build 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
|
||||
set -eoux pipefail
|
||||
image={{ image }}
|
||||
tag={{ tag }}
|
||||
flavor={{ flavor }}
|
||||
|
||||
# Validate
|
||||
just validate "${image}" "${tag}" "${flavor}"
|
||||
|
|
@ -570,12 +558,9 @@ build-iso-ghcr image="aurora" tag="latest" flavor="main":
|
|||
|
||||
# Run ISO
|
||||
[group('ISO')]
|
||||
run-iso image="aurora" tag="latest" flavor="main":
|
||||
run-iso $image="aurora" $tag="latest" $flavor="main":
|
||||
#!/usr/bin/bash
|
||||
set -eoux pipefail
|
||||
image={{ image }}
|
||||
tag={{ tag }}
|
||||
flavor={{ flavor }}
|
||||
|
||||
# Validate
|
||||
just validate "${image}" "${tag}" "${flavor}"
|
||||
|
|
@ -654,12 +639,9 @@ verify-container container="" registry="ghcr.io/ublue-os" key="":
|
|||
|
||||
# Secureboot Check
|
||||
[group('Utility')]
|
||||
secureboot image="aurora" tag="latest" flavor="main":
|
||||
secureboot $image="aurora" $tag="latest" $flavor="main":
|
||||
#!/usr/bin/bash
|
||||
set -eoux pipefail
|
||||
image={{ image }}
|
||||
tag={{ tag }}
|
||||
flavor={{ flavor }}
|
||||
|
||||
# Validate
|
||||
just validate "${image}" "${tag}" "${flavor}"
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ rpm-ostree install \
|
|||
|
||||
# RPMFUSION Dependent AKMODS
|
||||
rpm-ostree install \
|
||||
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/free/fedora/rpmfusion-free-release-"$(rpm -E %fedora)".noarch.rpm \
|
||||
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-"$(rpm -E %fedora)".noarch.rpm
|
||||
rpm-ostree install \
|
||||
broadcom-wl /tmp/akmods/kmods/*wl*.rpm \
|
||||
v4l2loopback /tmp/akmods/kmods/*v4l2loopback*.rpm
|
||||
|
|
@ -46,7 +46,11 @@ rpm-ostree uninstall rpmfusion-free-release rpmfusion-nonfree-release
|
|||
# Nvidia AKMODS
|
||||
if [[ "${IMAGE_NAME}" =~ nvidia ]]; then
|
||||
# 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)
|
||||
tar -xvzf /tmp/akmods-rpms/"$NVIDIA_TARGZ" -C /tmp/
|
||||
mv /tmp/rpms/* /tmp/akmods-rpms/
|
||||
|
|
@ -56,6 +60,7 @@ if [[ "${IMAGE_NAME}" =~ nvidia ]]; then
|
|||
chmod +x /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
|
||||
ln -sf libnvidia-ml.so.1 /usr/lib64/libnvidia-ml.so
|
||||
fi
|
||||
|
||||
# ZFS for stable
|
||||
|
|
|
|||
Loading…
Reference in a new issue