From 6e88d389816964f1dea3dfdc40da11e6a28e66c8 Mon Sep 17 00:00:00 2001
From: Christoph Alt <christoph.alt@fau.de>
Date: Tue, 15 Aug 2023 10:30:04 +0200
Subject: [PATCH] Using cuda as a base for the docker container to also test
 the gpu kernels

---
 .gitlab-ci.yml          | 1 +
 Dockerfile              | 4 ++--
 tests/test_benchmark.py | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 65e62e3..7a159bd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,6 +26,7 @@ test:
   image: i10git.cs.fau.de:5005/pycodegen/pystencils-benchmark/pystencils-benchmark
   tags:
     - docker
+    - cuda
   script:
     - pip install tox
     - echo $TOX_ENV
diff --git a/Dockerfile b/Dockerfile
index 2b8f8a8..dcb5493 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,7 @@
-FROM ubuntu:latest
+FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
 
 LABEL maintainer="jan.hoenig@fau.de"
-LABEL version="0.1"
+LABEL version="0.2"
 LABEL description="Custom docker image for pystencils-benchmark"
 
 ARG DEBIAN_FRONTEND=noninteractive
diff --git a/tests/test_benchmark.py b/tests/test_benchmark.py
index 929d4f8..62881ec 100755
--- a/tests/test_benchmark.py
+++ b/tests/test_benchmark.py
@@ -57,5 +57,5 @@ def test_generate_gpu(kwargs):
     with tempfile.TemporaryDirectory(dir=Path.cwd()) as temp_dir:
         temp_dir = Path(temp_dir)
         pb.gpu.generate_benchmark(kernel_vadd, temp_dir, compiler=compiler, **kwargs)
-        # subprocess.run(['make', '-C', f'{temp_dir}'], check=True)
-        # subprocess.run([f'{temp_dir}/benchmark-{compiler.name}', '10'], check=True)
+        subprocess.run(['make', '-C', f'{temp_dir}'], check=True)
+        subprocess.run([f'{temp_dir}/benchmark-{compiler.name}', '10'], check=True)
-- 
GitLab