# 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 # 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