mirror of
https://github.com/ROCm/ROCm-docker.git
synced 2025-12-25 14:51:45 +01: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
52 lines
1.9 KiB
Docker
52 lines
1.9 KiB
Docker
# This is a template dockerfile meant to be personalized for application development.
|
|
# Copy this dockerfile into a new build context (directory) and modify to taste.
|
|
|
|
# After a new build context is created, build with
|
|
# `docker build -t <user-name>/<project-name> .`
|
|
|
|
# Run the container to start up a development environment. Optionally, map host
|
|
# directories into the container with -v for development convenience, which is
|
|
# especially nice for source code to persist after the container closes.
|
|
# The following maps the host directory into the container 'read only'
|
|
|
|
# 'docker run -it --rm -v [host/directory]:[container/directory]:ro <user-name>/<project-name>'.
|
|
# Example: 'docker run -it --rm -v ~/src/my-hcc-project:/root/my-hcc-project:ro kknox/my-hcc-project'.
|
|
|
|
# The application container can inherit from any other OS container
|
|
FROM ubuntu:14.04
|
|
MAINTAINER Kent Knox <kent.knox@amd>
|
|
|
|
# Change WORKPATH to a location where
|
|
ENV WORKPATH /opt/my-rocm-project
|
|
|
|
# The working directory is meant to be where build files are generated
|
|
WORKDIR ${WORKPATH}
|
|
|
|
# Default to a login shell
|
|
ENTRYPOINT ["/bin/bash"]
|
|
CMD ["-l"]
|
|
|
|
# Initialize the image to install common and recommended dev tools
|
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
build-essential \
|
|
clang-3.5 \
|
|
libelf1 \
|
|
curl \
|
|
git \
|
|
gdb \
|
|
valgrind \
|
|
vim-nox \
|
|
cmake-curses-gui && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# The following attempts to create a nice command line developer environment
|
|
# 1. Sets up an enhanced command line dev environment within VIM
|
|
# 2. Aliases GDB to use its native TUI mode by default
|
|
RUN curl https://j.mp/spf13-vim3 -L | bash && \
|
|
echo "\nalias gdb='gdb --tui'" >> ~/.bashrc && \
|
|
echo "\nsource /opt/roct/setenv-roct.sh" >> ~/.bashrc && \
|
|
echo "\nsource /opt/hsa/setenv-rocr.sh" >> ~/.bashrc && \
|
|
echo "\nsource /opt/hcc/setenv-hcc.sh" >> ~/.bashrc && \
|
|
mkdir -p ${WORKPATH}
|