From 004f954401e08544159256aa065725e670bb8af0 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 2 Dec 2022 09:32:33 -0500 Subject: 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. --- .gitlab-ci.yml | 10 +++++++++ .gitlab/ci/configure_cuda11.8_minimal_nvidia.cmake | 3 +++ .gitlab/ci/docker/cuda11.8-minimal/Dockerfile | 5 +++++ .gitlab/ci/docker/cuda11.8-minimal/install_deps.sh | 26 ++++++++++++++++++++++ .gitlab/os-linux.yml | 15 +++++++++++++ 5 files changed, 59 insertions(+) create mode 100644 .gitlab/ci/configure_cuda11.8_minimal_nvidia.cmake create mode 100644 .gitlab/ci/docker/cuda11.8-minimal/Dockerfile create mode 100755 .gitlab/ci/docker/cuda11.8-minimal/install_deps.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a2b3ec3..3aa716d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -295,6 +295,16 @@ t:cuda11.6-clang: variables: CMAKE_CI_NO_MR: "true" +t:cuda11.8-minimal-ninja: + extends: + - .cuda11.8_minimal_nvidia + - .cmake_test_linux_release + - .linux_x86_64_tags_cuda + - .run_dependent + - .needs_centos6_x86_64 + variables: + CMAKE_CI_NO_MR: "true" + t:hip4.2-radeon: extends: - .hip4.2_radeon 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 + +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 diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index decf1b1..17c12c4 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -331,6 +331,21 @@ CMAKE_CONFIGURATION: cuda11.6_clang CTEST_NO_WARNINGS_ALLOWED: 1 +.cuda11.8_minimal: + image: "kitware/cmake:ci-cuda11.8-minimal-x86_64-2022-12-06" + + variables: + GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" + CMAKE_ARCH: x86_64 + CTEST_LABELS: "CUDA" + CMAKE_CUDA_ARCHITECTURES_NATIVE_CLAMP: 1 + +.cuda11.8_minimal_nvidia: + extends: .cuda11.8_minimal + variables: + CMAKE_CONFIGURATION: cuda11.8_minimal_nvidia + CTEST_NO_WARNINGS_ALLOWED: 1 + ### HIP builds .hip4.2: -- cgit v0.12