Files
rocm-systems/docker/Dockerfile.opensuse
T
David Galiffi 7633d86c62 Update cmake version installed in dockerfiles (#25)
* Update cmake version installed in dockerfiles
* Standardize the cmake_minimum_required to 3.18.4 across dockerfiles
* Fix link to perl repo in opensuse docker.

---------

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
2024-11-18 14:18:21 -05:00

56 строки
2.3 KiB
Docker

ARG DISTRO=opensuse/leap
ARG VERSION=15.5
FROM ${DISTRO}:${VERSION}
ENV HOME /root
ENV SHELL /bin/bash
ENV BASH_ENV /etc/bash.bashrc
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /tmp
SHELL [ "/bin/bash", "-c" ]
ENV PATH /usr/local/bin:${PATH}
ENV LIBRARY_PATH ${LIBRARY_PATH}:/opt/amdgpu/lib64
RUN set +e; \
zypper --non-interactive -i --gpg-auto-import-keys refresh; \
zypper --non-interactive -i patch; \
zypper --non-interactive -i patch; \
zypper --non-interactive -i --gpg-auto-import-keys refresh; \
exit 0
RUN zypper --non-interactive update -y && \
zypper --non-interactive dist-upgrade -y && \
zypper --non-interactive install -y -t pattern devel_basis && \
zypper --non-interactive install -y binutils-gold cmake curl dpkg-devel \
gcc-c++ git libnuma-devel openmpi3-devel python3-pip rpm-build wget && \
python3 -m pip install 'cmake==3.18.4'
ARG ROCM_VERSION=0.0
ARG AMDGPU_RPM=6.2/sle/15.6/amdgpu-install-6.2.60200-1.noarch.rpm
RUN if [ "${ROCM_VERSION}" != "0.0" ]; then \
OS_VERSION_MINOR=$(cat /etc/os-release | grep 'VERSION_ID' | sed 's/=/ /1' | awk '{print $NF}' | sed 's/"//g' | sed 's/\./ /g' | awk '{print $2}') && \
zypper --non-interactive addrepo https://download.opensuse.org/repositories/devel:languages:perl/15.${OS_VERSION_MINOR}/devel:languages:perl.repo && \
zypper --non-interactive --no-gpg-checks install -y https://repo.radeon.com/amdgpu-install/${AMDGPU_RPM} && \
zypper --non-interactive --gpg-auto-import-keys refresh && \
zypper --non-interactive install -y rocm-dev rocm-smi-lib roctracer-dev rocprofiler-dev rccl-devel libpciaccess0 && \
zypper --non-interactive clean --all; \
fi
ARG PYTHON_VERSIONS="6 7 8 9 10 11 12"
RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
bash miniconda.sh -b -p /opt/conda && \
export PATH="/opt/conda/bin:${PATH}" && \
conda config --set always_yes yes --set changeps1 no && \
conda update -c defaults -n base conda && \
for i in ${PYTHON_VERSIONS}; do conda create -n py3.${i} -c defaults -c conda-forge python=3.${i} pip; done && \
for i in ${PYTHON_VERSIONS}; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done && \
conda clean -a -y && \
conda init
WORKDIR /home
SHELL [ "/bin/bash", "--login", "-c" ]