FROM centos:7 LABEL maintainer=dl.mlsedevops@amd.com ARG ROCM_VERSION=6.2.4 ARG AMDGPU_VERSION=6.2.4 # Note: This is required patch since CentOS have reached EOL # otherwise any yum install setup will fail RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo # Base RUN yum -y install git java-1.8.0-openjdk python; yum clean all # Enable epel-release repositories RUN yum --enablerepo=extras install -y epel-release # Install required base build and packaging commands for ROCm RUN yum -y install \ ca-certificates \ bc \ bridge-utils \ cmake \ cmake3 \ devscripts \ dkms \ doxygen \ dpkg \ dpkg-dev \ dpkg-perl \ elfutils-libelf-devel \ expect \ file \ python3-dev \ python3-pip \ gettext \ gcc-c++ \ libgcc \ glibc.i686 \ libcxx-devel \ ncurses \ ncurses-base \ ncurses-libs \ numactl-devel \ numactl-libs \ libssh \ libunwind-devel \ libunwind \ llvm \ llvm-libs \ make \ openssl \ openssl-libs \ openssh \ openssh-clients \ pciutils \ pciutils-devel \ pciutils-libs \ python \ python-pip \ python-devel \ pkgconfig \ pth \ qemu-kvm \ re2c \ kmod \ file \ rpm \ rpm-build \ subversion \ wget # Enable the epel repository for fakeroot RUN yum --enablerepo=extras install -y fakeroot RUN yum clean all # On CentOS, install package centos-release-scl available in CentOS repository: RUN yum install -y centos-release-scl # Note: This is required patch since CentOS have reached EOL # otherwise any yum install setup will fail # Needed here again because above step adds new repo entries RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo # # Install the devtoolset-9 collection: #RUN yum install -y devtoolset-9 #RUN yum install -y devtoolset-9-libatomic-devel devtoolset-9-elfutils-libelf-devel # Install the devtoolset-9 collection: RUN yum install -y devtoolset-9 RUN yum install -y devtoolset-9-libatomic-devel devtoolset-9-elfutils-libelf-devel # Install the ROCm rpms RUN yum clean all RUN echo -e "[ROCm]\nname=ROCm\nbaseurl=https://repo.radeon.com/rocm/yum/$ROCM_VERSION/main\nenabled=1\ngpgcheck=0" >> /etc/yum.repos.d/rocm.repo RUN echo -e "[amdgpu]\nname=amdgpu\nbaseurl=https://repo.radeon.com/amdgpu/$AMDGPU_VERSION/rhel/7.9/main/x86_64\nenabled=1\ngpgcheck=0" >> /etc/yum.repos.d/amdgpu.repo RUN yum install -y rocm-dev # Set ENV to enable devtoolset7 by default ENV PATH=/opt/rh/devtoolset-9/root/usr/bin:/opt/rocm/hcc/bin:/opt/rocm/hip/bin:/opt/rocm/bin:/opt/rocm/hcc/bin:${PATH:+:${PATH}} ENV MANPATH=/opt/rh/devtoolset-9/root/usr/share/man:${MANPATH} ENV INFOPATH=/opt/rh/devtoolset-9/root/usr/share/info${INFOPATH:+:${INFOPATH}} ENV PCP_DIR=/opt/rh/devtoolset-9/root ENV PERL5LIB=/opt/rh/devtoolset-9/root//usr/lib64/perl5/vendor_perl:/opt/rh/devtoolset-9/root/usr/lib/perl5:/opt/rh/devtoolset-9/root//usr/share/perl5/ ENV LD_LIBRARY_PATH=/opt/rocm/lib:/usr/local/lib:/opt/rh/devtoolset-9/root$rpmlibdir$rpmlibdir32${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} ENV PYTHONPATH=/opt/rh/devtoolset-9/root/usr/lib64/python$pythonvers/site-packages:/opt/rh/devtoolset-9/root/usr/lib/python$pythonvers/ ENV LDFLAGS="-Wl,-rpath=/opt/rh/devtoolset-9/root/usr/lib64 -Wl,-rpath=/opt/rh/devtoolset-9/root/usr/lib"