ROCm-docker/rock/rock-deb-dockerfile.template
Kent Knox 0161194416 Adding HSAIL binary blogs to rocr container
Removing WORKPATH from most data-only containers
Reverted hcc-hsail to master branch for --develop based on
failure to build
2016-04-28 15:22:55 -05:00

39 lines
1.6 KiB
Plaintext

# Build this dockerfile with `docker build -f rock-deb-dockerfile -t roc/rock .`
# 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 and kernel modules
# This kfd has only been tested so far on linux-headers-generic-lts-vivid
# ubuntu:14.04.3, the native kernel is '3.19'
FROM ubuntu:14.04
MAINTAINER Kent Knox <kent.knox@amd>
# Default to a login shell
ENTRYPOINT ["/bin/bash"]
CMD ["-l"]
# Initialize image with debian package dependencies, cleanup to keep image small
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
crda \
wireless-crda \
git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# App specific environment variables
ENV ROCK_BUILD_PATH=/usr/local/src/ROCK-Kernel-Driver
# Clone as small of a repository as we can, unpack and install ubuntu packages only
# Keep the cloned repository as record of what was compiled into the container, but it does make the container size bigger
RUN mkdir -p ${ROCK_BUILD_PATH} && \
cd ${ROCK_BUILD_PATH} && \
git clone --no-checkout --depth=1 --branch=${repo_branch} https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver.git ./ && \
git checkout ${repo_branch} -- packages/ubuntu && \
DEBIAN_FRONTEND=noninteractive dpkg -i packages/ubuntu/compute-*.deb && \
DEBIAN_FRONTEND=noninteractive dpkg -i packages/ubuntu/linux-*.deb && \
git log -n 3 > ${rock_volume}/git-stamp.log && \
cd ~ && rm -rf ${ROCK_BUILD_PATH} && \
echo "KERNEL==\"kfd\", MODE=\"0666\"" | sudo tee /etc/udev/rules.d/kfd.rules