From 5bc213166f037dfe0d1612e6b559d1d53f39f325 Mon Sep 17 00:00:00 2001 From: nscipione Date: Mon, 11 Sep 2023 15:54:30 +0100 Subject: [PATCH] Update run_docker file Update script to build and run docker container locally. --- Dockerfile | 10 ---------- run_docker.sh | 26 ++++++++++++-------------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 75d80e15e..f60cba986 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/run_docker.sh b/run_docker.sh index 0c9270a66..65a64a946 100755 --- a/run_docker.sh +++ b/run_docker.sh @@ -5,20 +5,18 @@ # 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} \ @@ -26,7 +24,7 @@ docker build --build-arg c_compiler=${CC_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