CMake/.gitlab/ci/docker/cuda11.8-minimal/install_deps.sh
Robert Maynard 004f954401 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.
2022-12-06 15:44:33 -05:00

27 lines
535 B
Bash
Executable File

#!/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