1
0
Fork 0

Base nvidia images off of regular images
Some checks failed
/ build-kde (push) Failing after 9m36s
/ build-gnome (push) Has been cancelled

Previously regular images and nvidia images were split into separate
jobs and both were based off of an upstream image, this needlessly
increased build time and made maintaining the nvidia overlay take more
effort.
This commit is contained in:
ver4a 2024-11-14 00:18:41 +01:00
parent 13ee522084
commit ccacd6191a
3 changed files with 8 additions and 72 deletions

View file

@ -8,18 +8,11 @@ jobs:
- run: podman login -u ${{ vars.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }} ${{ vars.REGISTRY_DOMAIN }}
- run: podman build . -f Dockerfile.kde --no-cache --pull=always --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main
- run: podman push --compression-format=zstd:chunked --compression-level=${{ vars.COMPRESSION_LEVEL }} ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main
- if: '!cancelled()'
run: podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main && podman image prune -f
build-kde-nvidia:
runs-on: shell
steps:
- uses: actions/checkout@v4
- run: cd ${{ env.GITHUB_WORKSPACE }}
- run: podman login -u ${{ vars.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }} ${{ vars.REGISTRY_DOMAIN }}
- run: podman build . -f Dockerfile.kde-nvidia --no-cache --pull=always --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia
- run: podman build . -f Dockerfile.kde-nvidia --no-cache --pull=never --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia
- run: podman push --compression-format=zstd:chunked --compression-level=${{ vars.COMPRESSION_LEVEL }} ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia
- if: '!cancelled()'
run: podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia && podman image prune -f
run: podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main && podman image prune -f && \
podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia && podman image prune -f
build-gnome:
runs-on: shell
steps:
@ -28,15 +21,8 @@ jobs:
- run: podman login -u ${{ vars.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }} ${{ vars.REGISTRY_DOMAIN }}
- run: podman build . -f Dockerfile.gnome --no-cache --pull=always --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main
- run: podman push --compression-format=zstd:chunked --compression-level=${{ vars.COMPRESSION_LEVEL }} ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main
- if: '!cancelled()'
run: podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main && podman image prune -f
build-gnome-nvidia:
runs-on: shell
steps:
- uses: actions/checkout@v4
- run: cd ${{ env.GITHUB_WORKSPACE }}
- run: podman login -u ${{ vars.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }} ${{ vars.REGISTRY_DOMAIN }}
- run: podman build . -f Dockerfile.gnome-nvidia --no-cache --pull=always --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main-nvidia
- run: podman build . -f Dockerfile.gnome-nvidia --no-cache --pull=never --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main-nvidia
- run: podman push --compression-format=zstd:chunked --compression-level=${{ vars.COMPRESSION_LEVEL }} ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main-nvidia ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main-nvidia
- if: '!cancelled()'
run: podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main-nvidia && podman image prune -f
run: podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main && podman image prune -f && \
podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main-nvidia && podman image prune -f

View file

@ -1,26 +1,4 @@
FROM quay.io/fedora-ostree-desktops/silverblue:41
# Add rpmfusion repositories (this sometimes fails, so it has 3 tries before failing the build)
RUN (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) || \
(sleep 60 && 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) || \
(sleep 60 && 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)
# Install ffmpeg (removing all the -free replacements is required)
RUN rpm-ostree override remove libavcodec-free libavfilter-free libpostproc-free libswresample-free libswscale-free libavutil-free libavformat-free ffmpeg-free libavdevice-free --install=ffmpeg
# Install openh264
RUN rpm-ostree override remove noopenh264 --install openh264 --install mozilla-openh264
# Bulk of layered packages
RUN rpm-ostree install virt-manager vim neovim bat btop pv restic zstd nmap-ncat
RUN systemctl enable libvirtd
# Set vim as default editor
RUN rpm-ostree override remove nano-default-editor --install vim-default-editor
# Remove default color prompt (is replaced with a custom one)
RUN rpm-ostree override remove bash-color-prompt
FROM git.uncontrol.me/ver4a/onc-gnome:main
# Install nvidia drivers
RUN rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia-cuda && \
@ -29,8 +7,5 @@ RUN rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia-cuda && \
# Remove rpm metadata cache
RUN rpm-ostree cleanup --repomd
# Apply configuration
COPY etc /etc
# https://github.com/ostreedev/ostree-rs-ext/issues/159
RUN ostree container commit

View file

@ -1,26 +1,4 @@
FROM quay.io/fedora-ostree-desktops/kinoite:41
# Add rpmfusion repositories (this sometimes fails, so it has 3 tries before failing the build)
RUN (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) || \
(sleep 60 && 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) || \
(sleep 60 && 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)
# Install ffmpeg (removing all the -free replacements is required)
RUN rpm-ostree override remove libavcodec-free libavfilter-free libpostproc-free libswresample-free libswscale-free libavutil-free libavformat-free ffmpeg-free libavdevice-free --install=ffmpeg
# Install openh264
RUN rpm-ostree override remove noopenh264 --install openh264 --install mozilla-openh264
# Bulk of layered packages
RUN rpm-ostree install virt-manager vim neovim bat btop pv restic zstd nmap-ncat
RUN systemctl enable libvirtd
# Set vim as default editor
RUN rpm-ostree override remove nano-default-editor --install vim-default-editor
# Remove default color prompt (is replaced with a custom one)
RUN rpm-ostree override remove bash-color-prompt
FROM git.uncontrol.me/ver4a/onc-kde:main
# Install nvidia drivers
RUN rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia-cuda && \
@ -29,8 +7,5 @@ RUN rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia-cuda && \
# Remove rpm metadata cache
RUN rpm-ostree cleanup --repomd
# Apply configuration
COPY etc /etc
# https://github.com/ostreedev/ostree-rs-ext/issues/159
RUN ostree container commit