Skip to content

Commit

Permalink
Update run_docker file
Browse files Browse the repository at this point in the history
Update script to build and run docker container locally.
  • Loading branch information
s-Nick committed Sep 11, 2023
1 parent 4cdb34f commit 5bc2131
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
10 changes: 0 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ RUN apt-get -yq update

RUN pip install enum34

# Clang 6.0
RUN if [ "${c_compiler}" = 'clang-6.0' ]; then apt-get install -yq \
--allow-downgrades --allow-remove-essential --allow-change-held-packages \
clang-6.0 libomp-dev; fi

# GCC 7
RUN if [ "${c_compiler}" = 'gcc-7' ]; then apt-get install -yq \
--allow-downgrades --allow-remove-essential --allow-change-held-packages \
g++-7 gcc-7; fi

# OpenCL ICD Loader
RUN apt-get install -yq --allow-downgrades --allow-remove-essential \
--allow-change-held-packages ocl-icd-opencl-dev ocl-icd-dev opencl-headers
Expand Down
26 changes: 12 additions & 14 deletions run_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,26 @@
# developers can locally test changes in a (somewhat) platform-agnostic manner
# without the usual delay that travis testing entails.
#
# By default, this script will compile the portBLAS with g++-7. Other compilers
# can be enabled by changing the `CXX_COMPILER` and `CC_COMPILER` environment
# variables, e.g.:
# export CXX_COMPILER=clang++-6.0
# export CC_COMPILER=clang-6.0
# Targets and git "slug" are also equally configurable. By default, the target
# is OpenCL, and the git repository cloned is codeplay's portBLAS master.
# By default, this script will compile the portBLAS with open source DPCPP
# implementation. Other compilers can be enabled by changing the `CXX_COMPILER`
# and `CC_COMPILER` environment variables.
# Git "slug" are also equally configurable. By default the git repository
# cloned is codeplay's portBLAS master.

export IMPL=COMPUTECPP
export CXX_COMPILER=g++-7
export CC_COMPILER=gcc-7
export TARGET=opencl
export IMPL=DPCPP
export CXX_COMPILER="/tmp/dpcpp/bin/clang++"
export CC_COMPILER="/tmp/dpcpp/bin/clang"
export GIT_SLUG="codeplaysoftware/portBLAS"
export GIT_BRANCH="master"
export COMMAND="build-test"


docker build --build-arg c_compiler=${CC_COMPILER} \
--build-arg cxx_compiler=${CXX_COMPILER} \
--build-arg git_branch=${GIT_BRANCH} \
--build-arg git_slug=${GIT_SLUG} \
--build-arg impl=${IMPL} \
--build-arg target=${TARGET} \
-t portBLAS .
--build-arg command=${COMMAND} \
-t portblas .

docker run portBLAS
docker run portblas

0 comments on commit 5bc2131

Please sign in to comment.