FROM ubuntu:18.04 ARG PREFIX=/usr/local # Support multiarch RUN dpkg --add-architecture i386 # Add rocm repository RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://repo.radeon.com/rocm/apt/4.2/ xenial main > /etc/apt/sources.list.d/rocm.list' # Install dependencies RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \ apt-utils \ build-essential \ cmake \ curl \ g++-7 \ python3 \ python3-dev \ python3-pip \ software-properties-common \ wget \ migraphx && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Workaround broken rocm packages RUN ln -s /opt/rocm-* /opt/rocm RUN echo "/opt/rocm/lib" > /etc/ld.so.conf.d/rocm.conf RUN echo "/opt/rocm/llvm/lib" > /etc/ld.so.conf.d/rocm-llvm.conf RUN ldconfig ENV PYTHONPATH=/opt/rocm/lib