|
| 1 | +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note |
| 2 | + |
| 3 | +# Copyright (c) 2026 SUSE LLC |
| 4 | + |
| 5 | +# All modifications and additions to the file contributed by third parties |
| 6 | +# remain the property of their copyright owners, unless otherwise agreed |
| 7 | +# upon. |
| 8 | + |
| 9 | +# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. |
| 10 | +# It is maintained by the BCI team and generated by |
| 11 | +# https://github.com/SUSE/BCI-dockerfile-generator |
| 12 | + |
| 13 | +# Please submit bugfixes or comments via https://bugs.opensuse.org/ |
| 14 | +# You can contact the BCI team via https://github.com/SUSE/bci/discussions |
| 15 | + |
| 16 | +#!UseOBSRepositories |
| 17 | +#!ExclusiveArch: x86_64 |
| 18 | +#!BuildTag: third-party/amd/amdgpu-driver:sles-%OS_VERSION_ID_SP%-7.0.3-%RELEASE% |
| 19 | +#!BuildTag: third-party/amd/amdgpu-driver:sles-%OS_VERSION_ID_SP%-7.0.3 |
| 20 | +#!BuildTag: third-party/amd/amdgpu-driver:sles-15.7-6.4.0-150700.51-default-7.0.3 |
| 21 | +#!BuildName: amd-driver-7.0.3 |
| 22 | +#!BuildVersion: 15.7.7.0.3 |
| 23 | +FROM registry.suse.com/bci/bci-micro:15.7 AS target |
| 24 | +FROM registry.suse.com/bci/bci-base:15.7 AS builder |
| 25 | +COPY --from=target / /target |
| 26 | +RUN set -euo pipefail; zypper -n install --no-recommends awk dwarves elfutils gcc libelf-devel pesign-obs-integration zstd autoconf automake bc bison dracut flex gawk libzstd-devel make mokutil perl perl-Bootloader python3 python3-setuptools python3-wheel |
| 27 | +RUN set -euo pipefail; \ |
| 28 | + export CHKSTAT_ALLOW_INSECURE_MODE_IF_NO_PROC=1; \ |
| 29 | + zypper -n --installroot /target --gpg-auto-import-keys install --no-recommends rpm-ndb kmod sles-release |
| 30 | +RUN mkdir -p /tmp/ |
| 31 | +#!RemoteAssetUrl: https://repo.radeon.com/amdgpu/7.0.3/sle/15.7/main/x86_64/amdgpu-dkms-6.14.14-2247874.noarch.rpm amdgpu-dkms-6.14.14-2247874.x86_64.rpm sha256:9b15943e0de348e06cdb27242cdb8d2022cdacf3c3afdf4261c3e8b9621874c4 |
| 32 | +COPY amdgpu-dkms-6.14.14-2247874.x86_64.rpm /tmp/ |
| 33 | +#!RemoteAssetUrl: https://repo.radeon.com/amdgpu/7.0.3/sle/15.7/main/x86_64/amdgpu-dkms-firmware-30.10.3.0.30100300-2247874.noarch.rpm amdgpu-dkms-firmware-30.10.3.0.30100300-2247874.x86_64.rpm sha256:8898216d56dcae5d807b07cefd6d98bf6db784cf2e6e4693254ecb28733e6882 |
| 34 | +COPY amdgpu-dkms-firmware-30.10.3.0.30100300-2247874.x86_64.rpm /tmp/ |
| 35 | +#!RemoteAssetUrl: https://repo.radeon.com/amdgpu/7.0.3/sle/15.7/main/x86_64/dkms-3.0.11-bp156.1.2.noarch.rpm dkms-3.0.11-bp156.1.2.x86_64.rpm sha256:e23d830e20fa1cb64d03e1aa34637dcae590788d3e07c02a75631bde8454e2d5 |
| 36 | +COPY dkms-3.0.11-bp156.1.2.x86_64.rpm /tmp/ |
| 37 | +#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:SLE-15-SP7:GA/pool/x86_64/kernel-default/kernel-default-6.4.0-150700.51.1.x86_64.rpm |
| 38 | +COPY kernel-default-6.4.0-150700.51.1.x86_64.rpm /tmp/ |
| 39 | +#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:SLE-15-SP7:GA/pool/x86_64/kernel-default/kernel-default-devel-6.4.0-150700.51.1.x86_64.rpm |
| 40 | +COPY kernel-default-devel-6.4.0-150700.51.1.x86_64.rpm /tmp/ |
| 41 | +#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:SLE-15-SP7:GA/pool/x86_64/kernel-syms/kernel-syms-6.4.0-150700.51.1.x86_64.rpm |
| 42 | +COPY kernel-syms-6.4.0-150700.51.1.x86_64.rpm /tmp/ |
| 43 | +#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:SLE-15-SP7:GA/pool/x86_64/kernel-source/kernel-devel-6.4.0-150700.51.1.noarch.rpm kernel-devel-6.4.0-150700.51.1.x86_64.rpm |
| 44 | +COPY kernel-devel-6.4.0-150700.51.1.x86_64.rpm /tmp/ |
| 45 | +#!RemoteAssetUrl: https://api.opensuse.org/public/build/SUSE:SLE-15-SP7:GA/pool/x86_64/kernel-source/kernel-macros-6.4.0-150700.51.1.noarch.rpm kernel-macros-6.4.0-150700.51.1.x86_64.rpm |
| 46 | +COPY kernel-macros-6.4.0-150700.51.1.x86_64.rpm /tmp/ |
| 47 | + |
| 48 | +COPY radeon-sles15sp7-x86_64.gpg.key /tmp/radeon-sles15sp7-x86_64.gpg.key |
| 49 | +RUN rpm --import /tmp/radeon-sles15sp7-x86_64.gpg.key |
| 50 | + |
| 51 | + |
| 52 | +RUN if [ "$(uname -m)" = "x86_64" ]; then \ |
| 53 | + zypper -n install \ |
| 54 | + /tmp/amdgpu-dkms-6.14.14-2247874.x86_64.rpm \ |
| 55 | + /tmp/amdgpu-dkms-firmware-30.10.3.0.30100300-2247874.x86_64.rpm \ |
| 56 | + /tmp/dkms-3.0.11-bp156.1.2.x86_64.rpm \ |
| 57 | + /tmp/kernel-default-6.4.0-150700.51.1.x86_64.rpm \ |
| 58 | + /tmp/kernel-default-devel-6.4.0-150700.51.1.x86_64.rpm \ |
| 59 | + /tmp/kernel-syms-6.4.0-150700.51.1.x86_64.rpm \ |
| 60 | + /tmp/kernel-devel-6.4.0-150700.51.1.x86_64.rpm \ |
| 61 | + /tmp/kernel-macros-6.4.0-150700.51.1.x86_64.rpm; \ |
| 62 | + fi |
| 63 | + |
| 64 | +COPY radeon-sles15sp7-x86_64.repo /etc/zypp/repos.d/radeon-sles15sp7-x86_64.repo |
| 65 | + |
| 66 | +RUN rm -rf /tmp/* |
| 67 | + |
| 68 | +# decompress modules for getKmodsToSign (kmmmodule.go) since it expects uncompressed files |
| 69 | +RUN set -euo pipefail; \ |
| 70 | + find /lib/modules/6.4.0-150700.51-default -name "*.ko.zst" -exec zstd -d --rm {} \;; \ |
| 71 | + depmod 6.4.0-150700.51-default |
| 72 | + |
| 73 | +# copy modules to /opt since getKmodsToSign (kmmmodule.go) expects it there |
| 74 | +RUN set -euo pipefail; \ |
| 75 | + mkdir -p /target/opt/lib/modules/6.4.0-150700.51-default/updates/dkms; \ |
| 76 | + cp /lib/modules/6.4.0-150700.51-default/updates/amd* /target/opt/lib/modules/6.4.0-150700.51-default/updates/dkms; \ |
| 77 | + cp /lib/modules/6.4.0-150700.51-default/modules.* /target/opt/lib/modules/6.4.0-150700.51-default/; \ |
| 78 | + cp -r /lib/modules/6.4.0-150700.51-default/kernel /target/opt/lib/modules/6.4.0-150700.51-default/kernel; \ |
| 79 | + depmod -b /target/opt 6.4.0-150700.51-default |
| 80 | + |
| 81 | +# copy firmware to /firmwareDir |
| 82 | +RUN set -euo pipefail; \ |
| 83 | + mkdir -p /target/firmwareDir/updates/amdgpu; \ |
| 84 | + cp -r /lib/firmware/updates/amdgpu /target/firmwareDir/updates/amdgpu |
| 85 | + |
| 86 | +# cleanup logs and temporary files |
| 87 | +RUN set -euo pipefail; zypper -n --installroot /target clean -a; \ |
| 88 | + rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}; \ |
| 89 | + rm -rf {/target,}/run/*; \ |
| 90 | + rm -f {/target,}/etc/{shadow-,group-,passwd-,.pwd.lock}; \ |
| 91 | + rm -f {/target,}/usr/lib/sysimage/rpm/.rpm.lock; \ |
| 92 | + rm -f {/target,}/var/lib/zypp/AnonymousUniqueId; \ |
| 93 | + rm -f {/target,}/var/lib/zypp/AutoInstalled; \ |
| 94 | + rm -f {/target,}/var/cache/ldconfig/aux-cache |
| 95 | + |
| 96 | +# set the day of last password change to empty |
| 97 | +RUN set -euo pipefail; sed -i 's/^\([^:]*:[^:]*:\)[^:]*\(:.*\)$/\1\2/' /target/etc/shadow |
| 98 | +FROM registry.suse.com/bci/bci-micro:15.7 |
| 99 | +COPY --from=builder /target / |
| 100 | +# Define labels according to https://en.opensuse.org/Building_derived_containers |
| 101 | +# labelprefix=com.suse.third-party.amd-driver |
| 102 | +LABEL org.opencontainers.image.authors="https://github.com/SUSE/bci/discussions" |
| 103 | +LABEL org.opencontainers.image.title="SLE BCI AMD GPU Driver" |
| 104 | +LABEL org.opencontainers.image.description="AMD GPU Driver container based on the SUSE Linux Enterprise Base Container Image." |
| 105 | +LABEL org.opencontainers.image.version="7.0.3" |
| 106 | +LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/" |
| 107 | +LABEL org.opencontainers.image.created="%BUILDTIME%" |
| 108 | +LABEL org.opencontainers.image.vendor="SUSE LLC" |
| 109 | +LABEL org.opencontainers.image.source="%SOURCEURL%" |
| 110 | +LABEL org.opencontainers.image.ref.name="sles-%OS_VERSION_ID_SP%-7.0.3" |
| 111 | +LABEL org.opensuse.reference="registry.suse.com/third-party/amd/amdgpu-driver:sles-%OS_VERSION_ID_SP%-7.0.3-%RELEASE%" |
| 112 | +LABEL org.openbuildservice.disturl="%DISTURL%" |
| 113 | +LABEL com.suse.supportlevel="techpreview" |
| 114 | +LABEL com.suse.supportlevel.until="" |
| 115 | +LABEL com.suse.eula="sle-beta" |
| 116 | +LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15" |
| 117 | +LABEL com.suse.release-stage="beta" |
| 118 | +# endlabelprefix |
| 119 | +LABEL org.opencontainers.image.base.name="%BASE_REFNAME%" |
| 120 | +LABEL org.opencontainers.image.base.digest="%BASE_DIGEST%" |
| 121 | +LABEL io.artifacthub.package.readme-url="%SOURCEURL_WITH(README.md)%" |
0 commit comments