From 0209e4ff00f61f9289af1ddaa29bb2552c994e7e Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Fri, 8 Mar 2019 19:58:48 -0800 Subject: [PATCH] nvblas linking --- cuda/base/Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cuda/base/Dockerfile b/cuda/base/Dockerfile index 96f5f47..d3538f6 100644 --- a/cuda/base/Dockerfile +++ b/cuda/base/Dockerfile @@ -73,4 +73,11 @@ RUN echo "rsession-ld-library-path=$LD_LIBRARY_PATH" | tee -a /etc/rstudio/rserv \nCUDA_HOME=$CUDA_HOME \ \nCUDA_PATH=$CUDA_PATH \ \nPATH=$PATH" >> /usr/local/lib/R/etc/Renviron - + +## Allow R to use CUDA for BLAS, with fallback on openblas +ENV LD_PRELOAD=/usr/local/cuda/lib64/libnvblas.so.$CUDA_VERSION +ENV NVBLAS_CONFIG_FILE=/etc/nvblas.conf +RUN echo "NVBLAS_LOGFILE nvblas.log \ + \nNVBLAS_CPU_BLAS_LIB /usr/lib/libopenblas.so + \nNVBLAS_GPU_LIST ALL" > /etc/nvblas.conf +