# Parameters related to building rocsparse
ARG base_image

FROM ${base_image}
LABEL maintainer="rocsparse-maintainer@amd.com"

# Copy the rpm package of rocsparse into the container from host
COPY *.rpm /tmp/

# Install the rpm package, and print out contents of expected changed locations
RUN zypper refresh
RUN zypper -n --no-gpg-checks install \
    /tmp/rocsparse-*.rpm \
  && rm -f /tmp/*.rpm \
  && zypper -n clean -all \
  && rm -rf /var/lib/apt/lists/* \
  && printf "ls -la /etc/ld.so.conf.d/\n" && ls -la /etc/ld.so.conf.d/ \
  && printf "ls -la /opt/rocm/include\n" && ls -la /opt/rocm/include \
  && printf "ls -la /opt/rocm/lib\n" && ls -la /opt/rocm/lib \
  && printf "ls -la /opt/rocm/lib/cmake\n" && ls -la /opt/rocm/lib/cmake \
  && printf "ls -la /opt/rocm/rocsparse/include\n" && ls -la /opt/rocm/rocsparse/include \
  && printf "ls -la /opt/rocm/rocsparse/lib\n" && ls -la /opt/rocm/rocsparse/lib
