ROCm-docker/rocr/rocr-src-dockerfile.template
Kent Knox 078b40bad5 Adding dev/* dockerfiles meant to serve as base images
New dockerfiles exist in a subdirectory called /dev.  These are
meant to serve as base docker images downstream dockerfiles
use in FROM statements

Fixed stale URL's and fixed up the name of the rocm kernel packages.
2017-11-08 10:26:27 -06:00

69 lines
2.9 KiB
Plaintext

# Build this dockerfile with `docker build -f rocr-make-release-dockerfile -t roc/rocr .`
# To reduce container rebuild time, place commands least likely to change at top to
# most changing at bottom
# This builds the radeon open compute runtime
FROM ${roct_image_name_src}
MAINTAINER Kent Knox <kent.knox@amd>
# The following imports a key to the external AMD packages repository to make it trusted
# HSAIL based tools (hcc-hsail) need the finalizer libraries, which are closed source and not provided on github
# Hopefully, this can be removed in the future when dependencies on closed source blobs are removed
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl && \
curl -sL http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | apt-key add - && \
sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ trusty main > /etc/apt/sources.list.d/rocm.list' && \
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
libc6-dev-i386 \
libelf-dev \
git \
hsa-ext-rocr-dev \
cmake-curses-gui && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# App specific environment variables
ENV ROCR_BUILD_PATH=/usr/local/src/ROCR-Runtime/
# Configure, build and install the runtime
# Extract only the finalizer libraries and build open source libhsa-runtime64 component on top
#RUN mkdir -p ${ROCR_BUILD_PATH} && \
# cd ${ROCR_BUILD_PATH} && \
# git clone --depth=1 --branch=${tag} https://github.com/RadeonOpenCompute/ROCR-Runtime.git ./ && \
# mkdir -p build && \
# cd build && \
# cmake \
# -DHSAKMT_BUILD_INC_PATH=${roct_volume}include/libhsakmt \
# -DHSAKMT_BUILD_LIB_PATH=${roct_volume}${lib64_install_dir} \
# -DCMAKE_INSTALL_PREFIX=${rocr_volume} \
# -DCMAKE_BUILD_TYPE=${build_config} \
# ../src && \
# make -j $(nproc) install && \
# cp -r ../src/inc ${rocr_volume}/include && \
# cp -r ../sample ${rocr_volume}/sample && \
# ln -sr ${rocr_volume}/include/ ${rocm_volume}/include/hsa && \
# ln -sr ${rocr_volume}/include/ ${rocr_volume}/include/hsa && \
# ln -sr ${rocr_volume}/lib/libhsa-runtime64.so.1 ${rocm_volume}/lib/libhsa-runtime64.so && \
# git log -n 3 > ${rocr_volume}/git-stamp.log && \
# ${rocr_cleanup} \
# echo "${rocr_volume}lib" >> /etc/ld.so.conf.d/hsa-rocr-dev.conf && \
# ldconfig
RUN mkdir -p ${ROCR_BUILD_PATH} && \
cd ${ROCR_BUILD_PATH} && \
git clone --depth=1 --branch=${tag} https://github.com/RadeonOpenCompute/ROCR-Runtime.git ./ && \
mkdir -p build && \
cd build && \
cmake \
-DHSAKMT_BUILD_INC_PATH=${roct_volume}include/libhsakmt \
-DHSAKMT_BUILD_LIB_PATH=${roct_volume}${lib64_install_dir} \
-DCMAKE_INSTALL_PREFIX=${rocr_volume} \
-DCMAKE_BUILD_TYPE=${build_config} \
../src && \
make -j $(nproc) package && \
# dpkg -i hsa-rocr-dev-*.deb && \
./hsa-rocr-dev-1.1.0-Linux.sh --prefix=/opt/rocm --skip-license && \
git log -n 3 > ${rocr_volume}/git-stamp.log && \
${rocr_cleanup} \