# Build this dockerfile with `docker build -f roct-thunk-release-dockerfile -t roc/roct .` # To reduce container rebuild time, place commands least likely to change at top to # most changing at bottom # This builds the radeon open compute kernel thunk FROM ubuntu:${ubuntu_version} MAINTAINER Kent Knox # Initialize the image we are working with RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ build-essential \ fakeroot \ git \ ca-certificates \ libpci-dev \ cmake-curses-gui && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # App specific environment variables ENV HSATHK_BUILD_PATH=/usr/local/src/ROCT-Thunk-Interface # Uncomment the following code when ROCT-Thunk-Interface cmake code can make debian packages #RUN mkdir -p ${HSATHK_BUILD_PATH} && \ # cd ${HSATHK_BUILD_PATH} && \ # git clone --depth=1 --branch=${tag} https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git ./ && \ # mkdir -p build && \ # cd build && \ # cmake \ # -DCMAKE_INSTALL_PREFIX=${roct_volume} \ # -DCMAKE_BUILD_TYPE=${build_config} \ # .. && \ # make -j $(nproc) package && \ # ${roct_cleanup} \ # dpkg -i hsakmt-roct-dev-\*.deb && \ # git log -n 3 > ${roct_volume}/git-stamp.log RUN mkdir -p ${HSATHK_BUILD_PATH} && \ cd ${HSATHK_BUILD_PATH} && \ git clone --depth=1 --branch=${tag} https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git ./ && \ make -j $(nproc) deb && \ dpkg -i build/deb/hsakmt-dev-*.deb && \ ln -sr ${roct_volume}lib/libhsakmt.so.1 ${roct_volume}lib/libhsakmt.so && \ ${roct_cleanup}