mirror of
https://github.com/RadeonOpenCompute/ROCm-docker.git
synced 2023-04-23 17:53:00 +03:00
* Adding docker-compose Adding docker-compose configuration file to define how containers should be linked and what data to share. Adding setenv files to the hcc containers * New templating engine to generate dockerfiles on disk Changing roc-setup script to generate dockerfiles, so images are built with build contexts. Now, roc-setup only generates dockerfiles, and leverages the docker-compose utility to build images and compose the shared volumes * Adding thunk and runtime to docker compose file Building the thunk and runtime components with docker compose. Refactoring of various template files. * Further docker-compose development Added lots of little features and refactorings 1. Eliminated remove-image and dry-run options from roc-setup as redundant 2. Templated the install location of volumes 3. Rewrote the README file 4. Fixes to the install procedure for ROCT * Extracting binary hsa libraries, adding kfd device passthrough HSAIL generated binaries need libraries available in the ROCR debian package to properly function. The docker-compose yaml file now passes /dev/kfd access through to the container Various cleanup of docker template files * docker-compose.yml.template fix The image names for the example rocm-project services were the same
56 lines
1.8 KiB
Plaintext
56 lines
1.8 KiB
Plaintext
# Build this dockerfile with `docker build -f rock-make-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.3
|
|
MAINTAINER Kent Knox <kent.knox@amd>
|
|
|
|
# Constant environment variables
|
|
ENV WORKPATH /root
|
|
|
|
# Set working directory to be root's home directory
|
|
WORKDIR ${WORKPATH}
|
|
|
|
# Default to a login shell
|
|
ENTRYPOINT ["/bin/bash"]
|
|
CMD ["-l"]
|
|
|
|
# Initialize the image we are working with
|
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
crda \
|
|
wireless-crda \
|
|
build-essential \
|
|
bc \
|
|
git && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# App specific environment variables
|
|
ENV ROCK_BUILD_PATH=/usr/local/src/ROCK-Kernel-Driver
|
|
|
|
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 dev && \
|
|
make mrproper && \
|
|
echo "KERNEL==\"kfd\", MODE=\"0666\"" | sudo tee /etc/udev/rules.d/kfd.rules
|
|
|
|
# Copy a pre-configured kernel config that enables amdkfd & amdgpu
|
|
# 'device drivers' \ 'IOMMU Hardware support' \ 'amd_iommu_v2'
|
|
# 'device drivers' \ 'graphics support' \ 'direct rendering manager' \ 'AMD GPU'
|
|
# 'device drivers' \ 'graphics support' \ 'direct rendering manager' \ 'HSA kernel driver'
|
|
COPY rock.config /usr/local/src/ROCK-Kernel-Driver/.config
|
|
|
|
RUN cd ${ROCK_BUILD_PATH} && \
|
|
make olddefconfig && \
|
|
make -j $(nproc) && \
|
|
make modules_install install && \
|
|
DEBIAN_FRONTEND=noninteractive dpkg -i packages/ubuntu/compute-firmware*.deb
|
|
|
|
# VOLUME ["/usr/share/doc/compute-firmware"]
|