|
| 1 | +# SPDX-License-Identifier: MIT |
| 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: amdgpu-driver:sles-%OS_VERSION_ID_SP%-%%kernel_version%%-default-7.0.3 |
| 19 | +#!BuildName: bci-amdgpu-driver-%OS_VERSION_ID_SP% |
| 20 | +#!BuildVersion: 15.7.0 |
| 21 | +FROM registry.suse.com/bci/bci-micro:15.7 AS target |
| 22 | +FROM bci/bci-sle15-kernel-module-devel:15.7 AS builder |
| 23 | +COPY --from=target / /target |
| 24 | +RUN set -euo pipefail; zypper -n install --no-recommends autoconf automake bc bison flex kernel-default libzstd-devel perl python3 python3-setuptools python3-wheel |
| 25 | +RUN set -euo pipefail; \ |
| 26 | + export CHKSTAT_ALLOW_INSECURE_MODE_IF_NO_PROC=1; \ |
| 27 | + zypper -n --installroot /target --gpg-auto-import-keys install --no-recommends kmod |
| 28 | +RUN mkdir -p /tmp/ |
| 29 | +#!RemoteAssetUrl: https://repo.radeon.com/amdgpu/7.0.3/sle/15.7/main/x86_64/amdgpu-dkms-6.14.14-2247874.noarch.rpm sha256:9b15943e0de348e06cdb27242cdb8d2022cdacf3c3afdf4261c3e8b9621874c4 |
| 30 | +COPY amdgpu-dkms-6.14.14-2247874.noarch.rpm /tmp/ |
| 31 | +#!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 sha256:8898216d56dcae5d807b07cefd6d98bf6db784cf2e6e4693254ecb28733e6882 |
| 32 | +COPY amdgpu-dkms-firmware-30.10.3.0.30100300-2247874.noarch.rpm /tmp/ |
| 33 | +#!RemoteAssetUrl: https://repo.radeon.com/amdgpu/7.0.3/sle/15.7/main/x86_64/dkms-3.0.11-bp156.1.2.noarch.rpm sha256:e23d830e20fa1cb64d03e1aa34637dcae590788d3e07c02a75631bde8454e2d5 |
| 34 | +COPY dkms-3.0.11-bp156.1.2.noarch.rpm /tmp/ |
| 35 | + |
| 36 | +COPY third-party.gpg.key /tmp/amdgpu-driver.gpg.key |
| 37 | +RUN rpm --import /tmp/amdgpu-driver.gpg.key |
| 38 | + |
| 39 | + |
| 40 | +RUN if [ "$(uname -m)" = "x86_64" ]; then \ |
| 41 | + zypper -n install \ |
| 42 | + /tmp/amdgpu-dkms-6.14.14-2247874.noarch.rpm \ |
| 43 | + /tmp/amdgpu-dkms-firmware-30.10.3.0.30100300-2247874.noarch.rpm \ |
| 44 | + /tmp/dkms-3.0.11-bp156.1.2.noarch.rpm; \ |
| 45 | + fi |
| 46 | + |
| 47 | +COPY third-party.repo /etc/zypp/repos.d/amdgpu-driver.repo |
| 48 | + |
| 49 | +RUN rm -rf /tmp/* |
| 50 | + |
| 51 | +# cleanup logs and temporary files |
| 52 | +RUN set -euo pipefail; zypper -n --installroot /target clean -a; \ |
| 53 | + rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}; \ |
| 54 | + rm -rf {/target,}/run/*; \ |
| 55 | + rm -f {/target,}/etc/{shadow-,group-,passwd-,.pwd.lock}; \ |
| 56 | + rm -f {/target,}/usr/lib/sysimage/rpm/.rpm.lock; \ |
| 57 | + rm -f {/target,}/var/cache/ldconfig/aux-cache; \ |
| 58 | + command -v zypper >/dev/null 2>&1 || rm -f /var/lib/zypp/AutoInstalled |
| 59 | + |
| 60 | +# set the day of last password change to empty |
| 61 | +RUN set -euo pipefail; sed -i 's/^\([^:]*:[^:]*:\)[^:]*\(:.*\)$/\1\2/' /target/etc/shadow |
| 62 | +FROM registry.suse.com/bci/bci-micro:15.7 |
| 63 | +COPY --from=builder /target / |
| 64 | +# Define labels according to https://en.opensuse.org/Building_derived_containers |
| 65 | +# labelprefix=com.suse.bci.amdgpu-driver |
| 66 | +LABEL org.opencontainers.image.authors="https://github.com/SUSE/bci/discussions" |
| 67 | +LABEL org.opencontainers.image.title="SLE BCI AMD GPU Driver" |
| 68 | +LABEL org.opencontainers.image.description="AMD GPU Driver container based on the SUSE Linux Enterprise Base Container Image." |
| 69 | +LABEL org.opencontainers.image.version="%OS_VERSION_ID_SP%-%RELEASE%" |
| 70 | +LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/" |
| 71 | +LABEL org.opencontainers.image.created="%BUILDTIME%" |
| 72 | +LABEL org.opencontainers.image.vendor="SUSE LLC" |
| 73 | +LABEL org.opencontainers.image.source="%SOURCEURL%" |
| 74 | +LABEL org.opencontainers.image.ref.name="%OS_VERSION_ID_SP%-%RELEASE%" |
| 75 | +LABEL org.opensuse.reference="registry.suse.com/bci/bci-amdgpu-driver:%OS_VERSION_ID_SP%-%RELEASE%" |
| 76 | +LABEL org.openbuildservice.disturl="%DISTURL%" |
| 77 | +LABEL com.suse.supportlevel="techpreview" |
| 78 | +LABEL com.suse.eula="sle-bci" |
| 79 | +LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15" |
| 80 | +LABEL com.suse.release-stage="released" |
| 81 | +# endlabelprefix |
| 82 | +LABEL org.opencontainers.image.base.name="%BASE_REFNAME%" |
| 83 | +LABEL org.opencontainers.image.base.digest="%BASE_DIGEST%" |
| 84 | +LABEL io.artifacthub.package.readme-url="%SOURCEURL_WITH(README.md)%" |
0 commit comments