From 9fc236edd5e52ac00a2a3c1a954a455b05c8afaa Mon Sep 17 00:00:00 2001 From: mudler Date: Sat, 17 Jun 2023 15:27:40 +0200 Subject: [PATCH] images: Use gcc-11 with CUDA images GCC 12 is not compatible with nvcc yet. Fixes: https://github.com/go-skynet/LocalAI/issues/611 Signed-off-by: mudler --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 98e638e1..e56da7c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,9 @@ RUN apt-get update && \ # CuBLAS requirements RUN if [ "${BUILD_TYPE}" = "cublas" ]; then \ + apt-get remove -y gcc-12 g++-12 && apt-get autoremove -y && apt-get install -y gcc-11 g++-11 && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 && \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11 && \ apt-get install -y software-properties-common && \ apt-add-repository contrib && \ curl -O https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.0-1_all.deb && \