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 <mudler@localai.io>
This commit is contained in:
mudler 2023-06-17 15:27:40 +02:00 committed by mudler
parent 295f3030a9
commit 9fc236edd5

View file

@ -13,6 +13,9 @@ RUN apt-get update && \
# CuBLAS requirements # CuBLAS requirements
RUN if [ "${BUILD_TYPE}" = "cublas" ]; then \ 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-get install -y software-properties-common && \
apt-add-repository contrib && \ apt-add-repository contrib && \
curl -O https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.0-1_all.deb && \ curl -O https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.0-1_all.deb && \