lumi-rocm-rocm-5.4.5.docker for rocm/5.4.5-singularity-20231110 (rocm-5.4.5-singularity-20231110.eb)
Docker definition file lumi-rocm-rocm-5.4.5.docker
for the container provided by the module rocm/5.4.5-singularity-20231110
.
Docker file:
#FROM registry.suse.com/bci/bci-base:15.3.17.20.5
#FROM registry.suse.com/bci/bci-base:15.3.17.20.101
FROM registry.suse.com/bci/bci-base:15.3.17.20.145
ARG SERVER_PORT
#
# Disable BCI repros
#
RUN set -eux ; \
sed -i 's#enabled=1#enabled=0#g' /etc/zypp/repos.d/SLE_BCI.repo
RUN set -eux ; \
zypper -n addrepo http://download.opensuse.org/distribution/leap/15.3/repo/oss/ myrepo1 ; \
echo 'gpgcheck=0' >> /etc/zypp/repos.d/myrepo1.repo ; \
zypper -n addrepo https://download.opensuse.org/repositories/devel:/languages:/perl/SLE_15_SP3 myrepo2 ; \
echo 'gpgcheck=0' >> /etc/zypp/repos.d/myrepo2.repo
RUN set -eux ; \
sed -i 's#gpgcheck=1#gpgcheck=0#g' /etc/zypp/repos.d/*.repo
#
# Install build dependencies
#
RUN set -eux; \
zypper -n refresh ; \
zypper --no-gpg-checks -n install -y --force-resolution \
git cmake gcc10 gcc10-c++ gcc10-fortran zlib-devel numactl awk patch tar autoconf automake libtool libjson-c-devel graphviz ncurses-devel nano which ; \
zypper clean
#
# Cray info
#
ENV CPE_VERSION "23.03"
ENV CPE_URL="http://localhost:$SERVER_PORT/cpe-$CPE_VERSION.tar"
ENV LIBFABRIC_VERSION "1.15.2.0"
ENV LIBFABRIC_PATH /opt/cray/libfabric/$LIBFABRIC_VERSION
ENV MPICH_PATH "/opt/cray/pe/mpich/8.1.25/ofi/crayclang/10.0"
ENV LD_LIBRARY_PATH /opt/cray-deps:$LIBFABRIC_PATH/lib64:$MPICH_PATH/lib:/opt/cray/pe/lib64:/opt/cray/pe/lib64/cce
ENV REMOVE_CRAY_DEPS 'rm -rf /opt/cray /opt/cray-deps /usr/lib64/libcxi.so*'
ENV ROCM_RPM https://repo.radeon.com/amdgpu-install/5.4.5/sle/15.3/amdgpu-install-5.5.50501-1.noarch.rpm
ENV ROCM_RELEASE 5.4.5
RUN set -eux ; \
zypper --no-gpg-checks -n install $ROCM_RPM
RUN set -eux ; \
sed -i 's#gpgcheck=1#gpgcheck=0#g' /etc/zypp/repos.d/*.repo
RUN set -eux ; \
amdgpu-install -y --no-dkms --usecase=rocm --rocmrelease=$ROCM_RELEASE
#
# ROCm environment
#
ENV ROCM_PATH /opt/rocm-$ROCM_RELEASE
ENV PATH $ROCM_PATH/bin:$ROCM_PATH/llvm/bin:$PATH
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:$ROCM_PATH/lib
#
# Mark RCCL as non-debug - this can me overriden by RCCL debug build.
#
ENV RCCL_DEBUG 0
#
# Fix rocm-smi lib
#
RUN set -eux ; \
cd /opt ; \
curl -LO http://localhost:$SERVER_PORT/rocm-5.4.5-rocm-smi-lib.patch ; \
git clone -b rocm-$ROCM_RELEASE https://github.com/RadeonOpenCompute/rocm_smi_lib /opt/mybuild ; \
mkdir -p /opt/mybuild/build ; \
\
cd /opt/mybuild ; \
git apply < /opt/rocm-5.4.5-rocm-smi-lib.patch ; \
rm -rf /opt/rocm-5.4.5-rocm-smi-lib.patch ; \
\
cd /opt/mybuild/build ; \
cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm-patched .. ; \
make -j32 ; \
make -j32 install ; \
cd / ; rm -rf /opt/mybuild
RUN set -eux ; \
for i in liboam librocm_smi64 ; do \
src=$(find /opt/rocm-$ROCM_RELEASE -type f -iname $i.so*) ; \
dst=$(find /opt/rocm-patched -type f -iname $i.so*) ; \
rm -rf $src ; \
ln -s $dst $src ; \
done
RUN set -eux ; \
cd $ROCM_PATH/bin ; \
for i in rocm_agent_enumerator rocminfo ; do \
rm -rf $i ; \
curl -LO http://localhost:$SERVER_PORT/$i ; \
chmod +x $i ; \
done