From 0baf3ff67af2bf898b0cdf7b17570fdb8eb01fdc Mon Sep 17 00:00:00 2001 From: olga <odatskov@cern.ch> Date: Fri, 15 May 2020 13:45:22 +0200 Subject: [PATCH] Adding intel-oriented container for simpletrack --- .gitlab-ci.yml | 1 + lhc/simpletrack/Dockerfile.intel | 12 ++++++++++++ lhc/simpletrack/README.md | 15 +++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 lhc/simpletrack/Dockerfile.intel create mode 100644 lhc/simpletrack/README.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1013d73..96a4aa4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,3 +14,4 @@ build:image: script: - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/lhc/simpletrack/Dockerfile.nvidia --destination ${CI_REGISTRY_IMAGE}/lhc/simpletrack:nvidia-latest + - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/lhc/simpletrack/Dockerfile.intel --destination ${CI_REGISTRY_IMAGE}/lhc/simpletrack:intel-latest diff --git a/lhc/simpletrack/Dockerfile.intel b/lhc/simpletrack/Dockerfile.intel new file mode 100644 index 0000000..44edea0 --- /dev/null +++ b/lhc/simpletrack/Dockerfile.intel @@ -0,0 +1,12 @@ +FROM docker.io/intelopencl/intel-opencl:centos-7-copr + +ENV PARTICLES 20000 +ENV TURNS 15 +ENV DEVICE "0.0" + +RUN yum install -y python3 python3-devel python3-pip git gcc && pip3 install pyopencl \ + && mkdir /.cache && chmod -R 777 /.cache/ \ + && git clone https://github.com/rdemaria/simpletrack \ + && cd simpletrack && pip3 install -e . + +ENTRYPOINT [ "/bin/bash", "-c", "cd /simpletrack/examples/lhc/ && python3 benchmark_opencl.py -p $PARTICLES -t $TURNS -d $DEVICE" ] diff --git a/lhc/simpletrack/README.md b/lhc/simpletrack/README.md new file mode 100644 index 0000000..64df56d --- /dev/null +++ b/lhc/simpletrack/README.md @@ -0,0 +1,15 @@ +# SimpleTrack + +Docker images meant to build versions with the simpletrack benchmark for nvidia GPU and intel runtimes. + +* __Nvidia__: To run the benchmark through the container image entrypoint make sure to enable GPU passthrough. + +``` +~$ docker run --rm --gpus all gitlab-registry.cern.ch/hep-benchmarks/hep-workloads-gpu/lhc/simpletrack:nvidia-latest +``` + +* __Intel__: Make sure to passthrough the /dev/dri into the container. + +``` +~$ docker run --rm --device /dev/dri:/dev/dri gitlab-registry.cern.ch/hep-benchmarks/hep-workloads-gpu/lhc/simpletrack:intel-latest +``` -- GitLab