summaryrefslogtreecommitdiffstats
path: root/.gitlab/ci
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-12-02 14:32:33 (GMT)
committerBrad King <brad.king@kitware.com>2022-12-06 20:44:33 (GMT)
commit004f954401e08544159256aa065725e670bb8af0 (patch)
tree0e248024f589504fa08ae23259c1203ca2b47db9 /.gitlab/ci
parent4f9ec5a9befe176a402c079a1644de034ff6ab79 (diff)
downloadCMake-004f954401e08544159256aa065725e670bb8af0.zip
CMake-004f954401e08544159256aa065725e670bb8af0.tar.gz
CMake-004f954401e08544159256aa065725e670bb8af0.tar.bz2
ci: Add job to test minimal CUDA install (no static libs)
Some package managers provide a minimal set of static libraries, which historically has caused problems for FindCUDAToolkit. Resolve this issue by creating a CUDA image with only the minimal set of static libraries.
Diffstat (limited to '.gitlab/ci')
-rw-r--r--.gitlab/ci/configure_cuda11.8_minimal_nvidia.cmake3
-rw-r--r--.gitlab/ci/docker/cuda11.8-minimal/Dockerfile5
-rwxr-xr-x.gitlab/ci/docker/cuda11.8-minimal/install_deps.sh26
3 files changed, 34 insertions, 0 deletions
diff --git a/.gitlab/ci/configure_cuda11.8_minimal_nvidia.cmake b/.gitlab/ci/configure_cuda11.8_minimal_nvidia.cmake
new file mode 100644
index 0000000..519699b
--- /dev/null
+++ b/.gitlab/ci/configure_cuda11.8_minimal_nvidia.cmake
@@ -0,0 +1,3 @@
+set(CMake_TEST_CUDA "NVIDIA" CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
diff --git a/.gitlab/ci/docker/cuda11.8-minimal/Dockerfile b/.gitlab/ci/docker/cuda11.8-minimal/Dockerfile
new file mode 100644
index 0000000..02e096e
--- /dev/null
+++ b/.gitlab/ci/docker/cuda11.8-minimal/Dockerfile
@@ -0,0 +1,5 @@
+FROM nvidia/cuda:11.8.0-devel-ubuntu20.04
+MAINTAINER Robert Maynard <rmaynard@nvidia.com>
+
+COPY install_deps.sh /root/install_deps.sh
+RUN sh /root/install_deps.sh
diff --git a/.gitlab/ci/docker/cuda11.8-minimal/install_deps.sh b/.gitlab/ci/docker/cuda11.8-minimal/install_deps.sh
new file mode 100755
index 0000000..55f4ce5
--- /dev/null
+++ b/.gitlab/ci/docker/cuda11.8-minimal/install_deps.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+apt-get update
+
+# Install dependency without interaction.
+env DEBIAN_FRONTEND=noninteractive \
+ TZ=America/New_York \
+ apt-get install -y \
+ tzdata
+
+# Install development tools.
+apt-get install -y \
+ g++ \
+ curl \
+ git
+
+# Reduce to minimal subset of libraries by removing static libraries
+mkdir /tmp/cuda_required
+mv /usr/local/cuda/lib64/libcuda* /tmp/cuda_required/
+rm -f /usr/local/cuda/lib64/*static.a
+mv /tmp/cuda_required/libcuda* /usr/local/cuda/lib64/
+rmdir /tmp/cuda_required
+
+apt-get clean