ROCm-docker/hcc-hsail/hcc-hsail-dockerfile.template
Kent Knox a3746b2bbf Updates to README to describe new 1.0 containers
Removed the setenv scripts which are no longer needed
Refactored 'lib' install path
Changed the names of application targets in .yml file
2016-04-29 15:54:13 -05:00

62 lines
1.7 KiB
Plaintext

# Build this dockerfile with `docker build -f hcc-release-dockerfile -t roc/hcc .`
# To reduce container rebuild time, place commands least likely to change at top to
# most changing at bottom
# This builds the hcc compiler, and depends on an already existing rocr-runtime to be found
# ubuntu:14.04.3, the native kernel is '3.19'
FROM ${rocr_name}
MAINTAINER Kent Knox <kent.knox@amd>
# Default to a login shell
ENTRYPOINT ["/bin/bash"]
CMD ["-l"]
# Install dependencies required to build hcc
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
python \
libstdc++-4.8-dev \
libdwarf-dev \
libelf-dev \
libtinfo-dev \
libc6-dev-i386 \
gcc-multilib \
llvm-dev \
llvm-runtime \
libc++-dev \
libc++abi-dev \
re2c \
libncurses5-dev \
cmake \
git \
wget \
subversion && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# App specific environment variables
ENV HCC_BUILD_PATH=/usr/local/src/hcc-hsail
ENV PATH ${PATH}:${hcc_hsail_volume}/bin
# Build hcc, install to /usr/local
RUN mkdir -p ${HCC_BUILD_PATH} && \
cd ${HCC_BUILD_PATH} && \
git clone --depth=1 --branch=${repo_branch_hcc_hsail} https://github.com/RadeonOpenCompute/hcc.git ./ && \
mkdir -p build && \
cd build && \
ln -sr ${rocr_volume}/include ${rocr_volume}/include/hsa && \
cmake \
-DCMAKE_INSTALL_PREFIX=${hcc_hsail_volume} \
-DCMAKE_BUILD_TYPE=${build_config} \
-DROCM_ROOT=${rocr_volume} \
-DHSA_KMT_LIBRARY_DIR=${roct_volume}${lib64_install_dir} \
.. && \
make -j $(nproc) world && \
make install && \
git log -n 3 > ${hcc_hsail_volume}/git-stamp.log && \
${hcc_hsail_cleanup} \
echo "${hcc_hsail_volume}/lib" >> /etc/ld.so.conf.d/hcc.conf && \
ldconfig